; LLVM IR from upupming/algorithm :: BasicLevel_C++/1042. 字符统计(20) (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::__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
@.str = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca [26 x i32], align 16
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %11 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_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) %2)
          to label %12 unwind label %19

12:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 104, ptr %5) #7
  call void @llvm.memset.p0.i64(ptr align 16 %5, i8 0, i64 104, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %13

13:                                               ; preds = %36, %12
  %14 = load i32, ptr %6, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %17 = icmp ult i64 %15, %16
  br i1 %17, label %23, label %18

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

19:                                               ; preds = %0
  %20 = landingpad { ptr, i32 }
          cleanup
  %21 = extractvalue { ptr, i32 } %20, 0
  store ptr %21, ptr %3, align 8
  %22 = extractvalue { ptr, i32 } %20, 1
  store i32 %22, ptr %4, align 4
  br label %115

23:                                               ; preds = %13
  %24 = load i32, ptr %6, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %25)
          to label %27 unwind label %39

27:                                               ; preds = %23
  %28 = load i8, ptr %26, align 1, !tbaa !9
  %29 = sext i8 %28 to i32
  %30 = call i32 @tolower(i32 noundef %29) #8
  %31 = trunc i32 %30 to i8
  %32 = load i32, ptr %6, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %33)
          to label %35 unwind label %39

35:                                               ; preds = %27
  store i8 %31, ptr %34, align 1, !tbaa !9
  br label %36

36:                                               ; preds = %35
  %37 = load i32, ptr %6, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %6, align 4, !tbaa !5
  br label %13, !llvm.loop !10

39:                                               ; preds = %27, %23
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %3, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %114

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

44:                                               ; preds = %76, %43
  %45 = load i32, ptr %7, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %48 = icmp ult i64 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %79

50:                                               ; preds = %44
  %51 = load i32, ptr %7, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %52)
          to label %54 unwind label %71

54:                                               ; preds = %50
  %55 = load i8, ptr %53, align 1, !tbaa !9
  %56 = sext i8 %55 to i32
  %57 = call i32 @islower(i32 noundef %56) #8
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %59, label %75

59:                                               ; preds = %54
  %60 = load i32, ptr %7, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %61)
          to label %63 unwind label %71

63:                                               ; preds = %59
  %64 = load i8, ptr %62, align 1, !tbaa !9
  %65 = sext i8 %64 to i32
  %66 = sub nsw i32 %65, 97
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [26 x i32], ptr %5, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %68, align 4, !tbaa !5
  br label %75

71:                                               ; preds = %59, %50
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %3, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %114

75:                                               ; preds = %63, %54
  br label %76

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

79:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %80 = getelementptr inbounds [26 x i32], ptr %5, i64 0, i64 0
  %81 = load i32, ptr %80, align 16, !tbaa !5
  store i32 %81, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %100, %79
  %83 = load i32, ptr %10, align 4, !tbaa !5
  %84 = icmp slt i32 %83, 26
  br i1 %84, label %86, label %85

85:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %103

86:                                               ; preds = %82
  %87 = load i32, ptr %10, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [26 x i32], ptr %5, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = load i32, ptr %8, align 4, !tbaa !5
  %92 = icmp sgt i32 %90, %91
  br i1 %92, label %93, label %99

93:                                               ; preds = %86
  %94 = load i32, ptr %10, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [26 x i32], ptr %5, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  store i32 %97, ptr %8, align 4, !tbaa !5
  %98 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %98, ptr %9, align 4, !tbaa !5
  br label %99

99:                                               ; preds = %93, %86
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %10, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %10, align 4, !tbaa !5
  br label %82, !llvm.loop !13

103:                                              ; preds = %85
  %104 = load i32, ptr %9, align 4, !tbaa !5
  %105 = add nsw i32 %104, 97
  %106 = load i32, ptr %8, align 4, !tbaa !5
  %107 = invoke i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %105, i32 noundef %106)
          to label %108 unwind label %110

108:                                              ; preds = %103
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr %5) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #7
  %109 = load i32, ptr %1, align 4
  ret i32 %109

110:                                              ; preds = %103
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %3, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %114

114:                                              ; preds = %110, %71, %39
  call void @llvm.lifetime.end.p0(i64 104, ptr %5) #7
  br label %115

115:                                              ; preds = %114, %19
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #7
  br label %116

116:                                              ; preds = %115
  %117 = load ptr, ptr %3, align 8
  %118 = load i32, ptr %4, align 4
  %119 = insertvalue { ptr, i32 } poison, ptr %117, 0
  %120 = insertvalue { ptr, i32 } %119, i32 %118, 1
  resume { ptr, i32 } %120
}

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

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

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @tolower(i32 noundef) #5

; 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) #2 align 2

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @islower(i32 noundef) #5

declare i32 @printf(ptr noundef, ...) #6

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind willreturn memory(read) "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 = { "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 = { nounwind willreturn memory(read) }

!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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}


; 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::__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
@.str = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca [26 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  %3 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_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) %1)
          to label %4 unwind label %7

4:                                                ; preds = %0
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %2) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(104) %2, i8 0, i64 104, i1 false)
  %5 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  %.not33 = icmp eq i64 %5, 0
  br i1 %.not33, label %.preheader, label %.lr.ph

.preheader:                                       ; preds = %.lr.ph, %4
  %6 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  %.not34 = icmp eq i64 %6, 0
  br i1 %.not34, label %._crit_edge, label %.lr.ph29

7:                                                ; preds = %0
  %8 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #8
  resume { ptr, i32 } %8

.lr.ph:                                           ; preds = %4, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %4 ]
  %9 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv)
  %10 = load i8, ptr %9, align 1, !tbaa !5
  %11 = sext i8 %10 to i32
  %12 = call i32 @tolower(i32 noundef %11) #9
  %13 = trunc i32 %12 to i8
  %14 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv)
  store i8 %13, ptr %14, align 1, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %15 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  %16 = icmp ugt i64 %15, %indvars.iv.next
  br i1 %16, label %.lr.ph, label %.preheader, !llvm.loop !8

._crit_edge.loopexit:                             ; preds = %111
  %.pre = load i32, ptr %2, align 16, !tbaa !10
  %.phi.trans.insert = getelementptr inbounds i8, ptr %2, i64 4
  %.pre42 = load i32, ptr %.phi.trans.insert, align 4, !tbaa !10
  %.phi.trans.insert43 = getelementptr inbounds i8, ptr %2, i64 8
  %.pre44 = load i32, ptr %.phi.trans.insert43, align 8, !tbaa !10
  %.phi.trans.insert45 = getelementptr inbounds i8, ptr %2, i64 12
  %.pre46 = load i32, ptr %.phi.trans.insert45, align 4, !tbaa !10
  %.phi.trans.insert47 = getelementptr inbounds i8, ptr %2, i64 16
  %.pre48 = load i32, ptr %.phi.trans.insert47, align 16, !tbaa !10
  %.phi.trans.insert49 = getelementptr inbounds i8, ptr %2, i64 20
  %.pre50 = load i32, ptr %.phi.trans.insert49, align 4, !tbaa !10
  %.phi.trans.insert51 = getelementptr inbounds i8, ptr %2, i64 24
  %.pre52 = load i32, ptr %.phi.trans.insert51, align 8, !tbaa !10
  %.phi.trans.insert53 = getelementptr inbounds i8, ptr %2, i64 28
  %.pre54 = load i32, ptr %.phi.trans.insert53, align 4, !tbaa !10
  %.phi.trans.insert55 = getelementptr inbounds i8, ptr %2, i64 32
  %.pre56 = load i32, ptr %.phi.trans.insert55, align 16, !tbaa !10
  %.phi.trans.insert57 = getelementptr inbounds i8, ptr %2, i64 36
  %.pre58 = load i32, ptr %.phi.trans.insert57, align 4, !tbaa !10
  %.phi.trans.insert59 = getelementptr inbounds i8, ptr %2, i64 40
  %.pre60 = load i32, ptr %.phi.trans.insert59, align 8, !tbaa !10
  %.phi.trans.insert61 = getelementptr inbounds i8, ptr %2, i64 44
  %.pre62 = load i32, ptr %.phi.trans.insert61, align 4, !tbaa !10
  %.phi.trans.insert63 = getelementptr inbounds i8, ptr %2, i64 48
  %.pre64 = load i32, ptr %.phi.trans.insert63, align 16, !tbaa !10
  %.phi.trans.insert65 = getelementptr inbounds i8, ptr %2, i64 52
  %.pre66 = load i32, ptr %.phi.trans.insert65, align 4, !tbaa !10
  %.phi.trans.insert67 = getelementptr inbounds i8, ptr %2, i64 56
  %.pre68 = load i32, ptr %.phi.trans.insert67, align 8, !tbaa !10
  %.phi.trans.insert69 = getelementptr inbounds i8, ptr %2, i64 60
  %.pre70 = load i32, ptr %.phi.trans.insert69, align 4, !tbaa !10
  %.phi.trans.insert71 = getelementptr inbounds i8, ptr %2, i64 64
  %.pre72 = load i32, ptr %.phi.trans.insert71, align 16, !tbaa !10
  %.phi.trans.insert73 = getelementptr inbounds i8, ptr %2, i64 68
  %.pre74 = load i32, ptr %.phi.trans.insert73, align 4, !tbaa !10
  %.phi.trans.insert75 = getelementptr inbounds i8, ptr %2, i64 72
  %.pre76 = load i32, ptr %.phi.trans.insert75, align 8, !tbaa !10
  %.phi.trans.insert77 = getelementptr inbounds i8, ptr %2, i64 76
  %.pre78 = load i32, ptr %.phi.trans.insert77, align 4, !tbaa !10
  %.phi.trans.insert79 = getelementptr inbounds i8, ptr %2, i64 80
  %.pre80 = load i32, ptr %.phi.trans.insert79, align 16, !tbaa !10
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %17 = phi i32 [ %.pre80, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %18 = phi i32 [ %.pre78, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %19 = phi i32 [ %.pre76, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %20 = phi i32 [ %.pre74, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %21 = phi i32 [ %.pre72, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %22 = phi i32 [ %.pre70, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %23 = phi i32 [ %.pre68, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %24 = phi i32 [ %.pre66, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %25 = phi i32 [ %.pre64, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %26 = phi i32 [ %.pre62, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %27 = phi i32 [ %.pre60, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %28 = phi i32 [ %.pre58, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %29 = phi i32 [ %.pre56, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %30 = phi i32 [ %.pre54, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %31 = phi i32 [ %.pre52, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %32 = phi i32 [ %.pre50, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %33 = phi i32 [ %.pre48, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %34 = phi i32 [ %.pre46, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %35 = phi i32 [ %.pre44, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %36 = phi i32 [ %.pre42, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %37 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %38 = icmp sgt i32 %36, %37
  %spec.select = call i32 @llvm.smax.i32(i32 %36, i32 %37)
  %39 = icmp sgt i32 %35, %spec.select
  %spec.select.1 = call i32 @llvm.smax.i32(i32 %35, i32 %spec.select)
  %40 = select i1 %38, i32 98, i32 97
  %41 = icmp sgt i32 %34, %spec.select.1
  %spec.select.2 = call i32 @llvm.smax.i32(i32 %34, i32 %spec.select.1)
  %42 = select i1 %39, i32 99, i32 %40
  %43 = icmp sgt i32 %33, %spec.select.2
  %spec.select.3 = call i32 @llvm.smax.i32(i32 %33, i32 %spec.select.2)
  %44 = select i1 %41, i32 100, i32 %42
  %45 = icmp sgt i32 %32, %spec.select.3
  %spec.select.4 = call i32 @llvm.smax.i32(i32 %32, i32 %spec.select.3)
  %46 = select i1 %43, i32 101, i32 %44
  %47 = icmp sgt i32 %31, %spec.select.4
  %spec.select.5 = call i32 @llvm.smax.i32(i32 %31, i32 %spec.select.4)
  %48 = select i1 %45, i32 102, i32 %46
  %49 = icmp sgt i32 %30, %spec.select.5
  %spec.select.6 = call i32 @llvm.smax.i32(i32 %30, i32 %spec.select.5)
  %50 = select i1 %47, i32 103, i32 %48
  %51 = icmp sgt i32 %29, %spec.select.6
  %spec.select.7 = call i32 @llvm.smax.i32(i32 %29, i32 %spec.select.6)
  %52 = select i1 %49, i32 104, i32 %50
  %53 = icmp sgt i32 %28, %spec.select.7
  %spec.select.8 = call i32 @llvm.smax.i32(i32 %28, i32 %spec.select.7)
  %54 = select i1 %51, i32 105, i32 %52
  %55 = icmp sgt i32 %27, %spec.select.8
  %spec.select.9 = call i32 @llvm.smax.i32(i32 %27, i32 %spec.select.8)
  %56 = select i1 %53, i32 106, i32 %54
  %57 = icmp sgt i32 %26, %spec.select.9
  %spec.select.10 = call i32 @llvm.smax.i32(i32 %26, i32 %spec.select.9)
  %58 = select i1 %55, i32 107, i32 %56
  %59 = icmp sgt i32 %25, %spec.select.10
  %spec.select.11 = call i32 @llvm.smax.i32(i32 %25, i32 %spec.select.10)
  %60 = select i1 %57, i32 108, i32 %58
  %61 = icmp sgt i32 %24, %spec.select.11
  %spec.select.12 = call i32 @llvm.smax.i32(i32 %24, i32 %spec.select.11)
  %62 = select i1 %59, i32 109, i32 %60
  %63 = icmp sgt i32 %23, %spec.select.12
  %spec.select.13 = call i32 @llvm.smax.i32(i32 %23, i32 %spec.select.12)
  %64 = select i1 %61, i32 110, i32 %62
  %65 = icmp sgt i32 %22, %spec.select.13
  %spec.select.14 = call i32 @llvm.smax.i32(i32 %22, i32 %spec.select.13)
  %66 = select i1 %63, i32 111, i32 %64
  %67 = icmp sgt i32 %21, %spec.select.14
  %spec.select.15 = call i32 @llvm.smax.i32(i32 %21, i32 %spec.select.14)
  %68 = select i1 %65, i32 112, i32 %66
  %69 = icmp sgt i32 %20, %spec.select.15
  %spec.select.16 = call i32 @llvm.smax.i32(i32 %20, i32 %spec.select.15)
  %70 = select i1 %67, i32 113, i32 %68
  %71 = icmp sgt i32 %19, %spec.select.16
  %spec.select.17 = call i32 @llvm.smax.i32(i32 %19, i32 %spec.select.16)
  %72 = select i1 %69, i32 114, i32 %70
  %73 = icmp sgt i32 %18, %spec.select.17
  %spec.select.18 = call i32 @llvm.smax.i32(i32 %18, i32 %spec.select.17)
  %74 = select i1 %71, i32 115, i32 %72
  %75 = icmp sgt i32 %17, %spec.select.18
  %spec.select.19 = call i32 @llvm.smax.i32(i32 %17, i32 %spec.select.18)
  %76 = select i1 %73, i32 116, i32 %74
  %77 = getelementptr inbounds i8, ptr %2, i64 84
  %78 = load i32, ptr %77, align 4, !tbaa !10
  %79 = icmp sgt i32 %78, %spec.select.19
  %spec.select.20 = call i32 @llvm.smax.i32(i32 %78, i32 %spec.select.19)
  %80 = select i1 %75, i32 117, i32 %76
  %81 = getelementptr inbounds i8, ptr %2, i64 88
  %82 = load i32, ptr %81, align 8, !tbaa !10
  %83 = icmp sgt i32 %82, %spec.select.20
  %spec.select.21 = call i32 @llvm.smax.i32(i32 %82, i32 %spec.select.20)
  %84 = select i1 %79, i32 118, i32 %80
  %85 = getelementptr inbounds i8, ptr %2, i64 92
  %86 = load i32, ptr %85, align 4, !tbaa !10
  %87 = icmp sgt i32 %86, %spec.select.21
  %spec.select.22 = call i32 @llvm.smax.i32(i32 %86, i32 %spec.select.21)
  %88 = select i1 %83, i32 119, i32 %84
  %89 = getelementptr inbounds i8, ptr %2, i64 96
  %90 = load i32, ptr %89, align 16, !tbaa !10
  %91 = icmp sgt i32 %90, %spec.select.22
  %spec.select.23 = call i32 @llvm.smax.i32(i32 %90, i32 %spec.select.22)
  %92 = select i1 %87, i32 120, i32 %88
  %93 = getelementptr inbounds i8, ptr %2, i64 100
  %94 = load i32, ptr %93, align 4, !tbaa !10
  %95 = icmp sgt i32 %94, %spec.select.23
  %spec.select.24 = call i32 @llvm.smax.i32(i32 %94, i32 %spec.select.23)
  %96 = select i1 %91, i32 121, i32 %92
  %97 = select i1 %95, i32 122, i32 %96
  %98 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %97, i32 noundef %spec.select.24)
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %2) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #8
  ret i32 0

.lr.ph29:                                         ; preds = %.preheader, %111
  %indvars.iv36 = phi i64 [ %indvars.iv.next37, %111 ], [ 0, %.preheader ]
  %99 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv36)
  %100 = load i8, ptr %99, align 1, !tbaa !5
  %101 = sext i8 %100 to i32
  %102 = call i32 @islower(i32 noundef %101) #9
  %.not = icmp eq i32 %102, 0
  br i1 %.not, label %111, label %103

103:                                              ; preds = %.lr.ph29
  %104 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv36)
  %105 = load i8, ptr %104, align 1, !tbaa !5
  %106 = sext i8 %105 to i64
  %107 = add nsw i64 %106, -97
  %108 = getelementptr inbounds [26 x i32], ptr %2, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !10
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %108, align 4, !tbaa !10
  br label %111

111:                                              ; preds = %.lr.ph29, %103
  %indvars.iv.next37 = add nuw nsw i64 %indvars.iv36, 1
  %112 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  %113 = icmp ugt i64 %112, %indvars.iv.next37
  br i1 %113, label %.lr.ph29, label %._crit_edge.loopexit, !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 nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_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 #3

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare i32 @tolower(i32 noundef) local_unnamed_addr #5

; 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 #2 align 2

; 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 nofree nounwind willreturn memory(read)
declare i32 @islower(i32 noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #6

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #7

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 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 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { mustprogress nofree nounwind willreturn memory(read) "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 = { nofree nounwind "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }

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


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