; LLVM IR from upupming/algorithm :: CCCC-GPLT/L1-023. 输出GPLT (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] }

@c = external dso_local global [4 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 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 i32, align 4
  %6 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  %7 = 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) %2)
          to label %8 unwind label %15

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

9:                                                ; preds = %75, %8
  %10 = load i32, ptr %5, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %12 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  %13 = icmp ult i64 %11, %12
  br i1 %13, label %19, label %14

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

15:                                               ; preds = %0
  %16 = landingpad { ptr, i32 }
          cleanup
  %17 = extractvalue { ptr, i32 } %16, 0
  store ptr %17, ptr %3, align 8
  %18 = extractvalue { ptr, i32 } %16, 1
  store i32 %18, ptr %4, align 4
  br label %144

19:                                               ; preds = %9
  %20 = load i32, ptr %5, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %21)
          to label %23 unwind label %31

23:                                               ; preds = %19
  %24 = load i8, ptr %22, align 1, !tbaa !9
  %25 = sext i8 %24 to i32
  %26 = call i32 @toupper(i32 noundef %25) #7
  %27 = icmp eq i32 %26, 71
  br i1 %27, label %28, label %35

28:                                               ; preds = %23
  %29 = load i32, ptr @c, align 16, !tbaa !5
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr @c, align 16, !tbaa !5
  br label %74

31:                                               ; preds = %59, %47, %35, %19
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %3, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %144

35:                                               ; preds = %23
  %36 = load i32, ptr %5, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %37)
          to label %39 unwind label %31

39:                                               ; preds = %35
  %40 = load i8, ptr %38, align 1, !tbaa !9
  %41 = sext i8 %40 to i32
  %42 = call i32 @toupper(i32 noundef %41) #7
  %43 = icmp eq i32 %42, 80
  br i1 %43, label %44, label %47

44:                                               ; preds = %39
  %45 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr getelementptr inbounds ([4 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  br label %73

47:                                               ; preds = %39
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %49)
          to label %51 unwind label %31

51:                                               ; preds = %47
  %52 = load i8, ptr %50, align 1, !tbaa !9
  %53 = sext i8 %52 to i32
  %54 = call i32 @toupper(i32 noundef %53) #7
  %55 = icmp eq i32 %54, 76
  br i1 %55, label %56, label %59

56:                                               ; preds = %51
  %57 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @c, i64 0, i64 2), align 8, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr getelementptr inbounds ([4 x i32], ptr @c, i64 0, i64 2), align 8, !tbaa !5
  br label %72

59:                                               ; preds = %51
  %60 = load i32, ptr %5, 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 %31

63:                                               ; preds = %59
  %64 = load i8, ptr %62, align 1, !tbaa !9
  %65 = sext i8 %64 to i32
  %66 = call i32 @toupper(i32 noundef %65) #7
  %67 = icmp eq i32 %66, 84
  br i1 %67, label %68, label %71

68:                                               ; preds = %63
  %69 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @c, i64 0, i64 3), align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr getelementptr inbounds ([4 x i32], ptr @c, i64 0, i64 3), align 4, !tbaa !5
  br label %71

71:                                               ; preds = %68, %63
  br label %72

72:                                               ; preds = %71, %56
  br label %73

73:                                               ; preds = %72, %44
  br label %74

74:                                               ; preds = %73, %28
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %5, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %5, align 4, !tbaa !5
  br label %9, !llvm.loop !10

78:                                               ; preds = %14
  br label %79

79:                                               ; preds = %141, %78
  %80 = load i32, ptr @c, align 16, !tbaa !5
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %91, label %82

82:                                               ; preds = %79
  %83 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %91, label %85

85:                                               ; preds = %82
  %86 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @c, i64 0, i64 2), align 8, !tbaa !5
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %91, label %88

88:                                               ; preds = %85
  %89 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @c, i64 0, i64 3), align 4, !tbaa !5
  %90 = icmp ne i32 %89, 0
  br label %91

91:                                               ; preds = %88, %85, %82, %79
  %92 = phi i1 [ true, %85 ], [ true, %82 ], [ true, %79 ], [ %90, %88 ]
  br i1 %92, label %93, label %142

93:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %138, %93
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = icmp slt i32 %95, 4
  br i1 %96, label %98, label %97

97:                                               ; preds = %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %141

98:                                               ; preds = %94
  %99 = load i32, ptr %6, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [4 x i32], ptr @c, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %104, label %137

104:                                              ; preds = %98
  %105 = load i32, ptr %6, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [4 x i32], ptr @c, i64 0, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = add nsw i32 %108, -1
  store i32 %109, ptr %107, align 4, !tbaa !5
  %110 = load i32, ptr %6, align 4, !tbaa !5
  %111 = icmp eq i32 %110, 0
  br i1 %111, label %112, label %119

112:                                              ; preds = %104
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %114 unwind label %115

114:                                              ; preds = %112
  br label %136

115:                                              ; preds = %131, %128, %122, %112
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %3, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %144

119:                                              ; preds = %104
  %120 = load i32, ptr %6, align 4, !tbaa !5
  %121 = icmp eq i32 %120, 1
  br i1 %121, label %122, label %125

122:                                              ; preds = %119
  %123 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
          to label %124 unwind label %115

124:                                              ; preds = %122
  br label %135

125:                                              ; preds = %119
  %126 = load i32, ptr %6, align 4, !tbaa !5
  %127 = icmp eq i32 %126, 2
  br i1 %127, label %128, label %131

128:                                              ; preds = %125
  %129 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
          to label %130 unwind label %115

130:                                              ; preds = %128
  br label %134

131:                                              ; preds = %125
  %132 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
          to label %133 unwind label %115

133:                                              ; preds = %131
  br label %134

134:                                              ; preds = %133, %130
  br label %135

135:                                              ; preds = %134, %124
  br label %136

136:                                              ; preds = %135, %114
  br label %137

137:                                              ; preds = %136, %98
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %6, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %6, align 4, !tbaa !5
  br label %94, !llvm.loop !12

141:                                              ; preds = %97
  br label %79, !llvm.loop !13

142:                                              ; preds = %91
  store i32 0, ptr %1, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #6
  %143 = load i32, ptr %1, align 4
  ret i32 %143

144:                                              ; preds = %115, %31, %15
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #6
  br label %145

145:                                              ; preds = %144
  %146 = load ptr, ptr %3, align 8
  %147 = load i32, ptr %4, align 4
  %148 = insertvalue { ptr, i32 } poison, ptr %146, 0
  %149 = insertvalue { ptr, i32 } %148, i32 %147, 1
  resume { ptr, i32 } %149
}

; 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

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

declare i32 @__gxx_personality_v0(...)

; 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 @toupper(i32 noundef) #4

; 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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5

; 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 = { "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 = { 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 #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 = { nounwind }
attributes #7 = { 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::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] }

@c = external dso_local local_unnamed_addr global [4 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 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
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  %2 = 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) %1)
          to label %.preheader26 unwind label %8

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

.preheader:                                       ; preds = %45, %.preheader26
  %4 = load <4 x i32>, ptr @c, align 16
  %.fr = freeze <4 x i32> %4
  %5 = icmp ne <4 x i32> %.fr, zeroinitializer
  %6 = bitcast <4 x i1> %5 to i4
  %.not37 = icmp eq i4 %6, 0
  br i1 %.not37, label %._crit_edge, label %.critedge.preheader.preheader

.critedge.preheader.preheader:                    ; preds = %.preheader
  %7 = extractelement <4 x i32> %.fr, i64 0
  br label %.critedge.preheader

8:                                                ; preds = %0
  %9 = landingpad { ptr, i32 }
          cleanup
  br label %70

.lr.ph:                                           ; preds = %.preheader26, %45
  %indvars.iv = phi i64 [ %indvars.iv.next, %45 ], [ 0, %.preheader26 ]
  %10 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv)
  %11 = load i8, ptr %10, align 1, !tbaa !5
  %12 = sext i8 %11 to i32
  %13 = call i32 @toupper(i32 noundef %12) #7
  %14 = icmp eq i32 %13, 71
  br i1 %14, label %15, label %18

15:                                               ; preds = %.lr.ph
  %16 = load i32, ptr @c, align 16, !tbaa !8
  %17 = add nsw i32 %16, 1
  store i32 %17, ptr @c, align 16, !tbaa !8
  br label %45

18:                                               ; preds = %.lr.ph
  %19 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv)
  %20 = load i8, ptr %19, align 1, !tbaa !5
  %21 = sext i8 %20 to i32
  %22 = call i32 @toupper(i32 noundef %21) #7
  %23 = icmp eq i32 %22, 80
  br i1 %23, label %24, label %27

24:                                               ; preds = %18
  %25 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !8
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !8
  br label %45

27:                                               ; preds = %18
  %28 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv)
  %29 = load i8, ptr %28, align 1, !tbaa !5
  %30 = sext i8 %29 to i32
  %31 = call i32 @toupper(i32 noundef %30) #7
  %32 = icmp eq i32 %31, 76
  br i1 %32, label %33, label %36

33:                                               ; preds = %27
  %34 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 8), align 8, !tbaa !8
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr getelementptr inbounds (i8, ptr @c, i64 8), align 8, !tbaa !8
  br label %45

36:                                               ; preds = %27
  %37 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %indvars.iv)
  %38 = load i8, ptr %37, align 1, !tbaa !5
  %39 = sext i8 %38 to i32
  %40 = call i32 @toupper(i32 noundef %39) #7
  %41 = icmp eq i32 %40, 84
  br i1 %41, label %42, label %45

42:                                               ; preds = %36
  %43 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 12), align 4, !tbaa !8
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr getelementptr inbounds (i8, ptr @c, i64 12), align 4, !tbaa !8
  br label %45

45:                                               ; preds = %15, %33, %42, %36, %24
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %46 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  %47 = icmp ugt i64 %46, %indvars.iv.next
  br i1 %47, label %.lr.ph, label %.preheader, !llvm.loop !10

.critedge.preheader:                              ; preds = %.critedge.preheader.preheader, %.critedge.3
  %48 = phi i32 [ %69, %.critedge.3 ], [ %7, %.critedge.preheader.preheader ]
  %.not = icmp eq i32 %48, 0
  br i1 %.not, label %.critedge, label %49

49:                                               ; preds = %.critedge.preheader
  %50 = add nsw i32 %48, -1
  store i32 %50, ptr @c, align 16, !tbaa !8
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %.critedge unwind label %52

52:                                               ; preds = %63, %59, %55, %49
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %70

.critedge:                                        ; preds = %.critedge.preheader, %49
  %54 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !8
  %.not.1 = icmp eq i32 %54, 0
  br i1 %.not.1, label %.critedge.1, label %55

55:                                               ; preds = %.critedge
  %56 = add nsw i32 %54, -1
  store i32 %56, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !8
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
          to label %.critedge.1 unwind label %52

.critedge.1:                                      ; preds = %55, %.critedge
  %58 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 8), align 8, !tbaa !8
  %.not.2 = icmp eq i32 %58, 0
  br i1 %.not.2, label %.critedge.2, label %59

59:                                               ; preds = %.critedge.1
  %60 = add nsw i32 %58, -1
  store i32 %60, ptr getelementptr inbounds (i8, ptr @c, i64 8), align 8, !tbaa !8
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %.critedge.2 unwind label %52

.critedge.2:                                      ; preds = %59, %.critedge.1
  %62 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 12), align 4, !tbaa !8
  %.not.3 = icmp eq i32 %62, 0
  br i1 %.not.3, label %.critedge.3, label %63

63:                                               ; preds = %.critedge.2
  %64 = add nsw i32 %62, -1
  store i32 %64, ptr getelementptr inbounds (i8, ptr @c, i64 12), align 4, !tbaa !8
  %65 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
          to label %.critedge.3 unwind label %52

.critedge.3:                                      ; preds = %63, %.critedge.2
  %66 = load <4 x i32>, ptr @c, align 16
  %.fr38 = freeze <4 x i32> %66
  %67 = icmp ne <4 x i32> %.fr38, zeroinitializer
  %68 = bitcast <4 x i1> %67 to i4
  %.not39 = icmp eq i4 %68, 0
  %69 = extractelement <4 x i32> %.fr38, i64 0
  br i1 %.not39, label %._crit_edge, label %.critedge.preheader, !llvm.loop !12

._crit_edge:                                      ; preds = %.critedge.3, %.preheader
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #6
  ret i32 0

70:                                               ; preds = %52, %8
  %.pn = phi { ptr, i32 } [ %53, %52 ], [ %9, %8 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn
}

; 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

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

declare i32 @__gxx_personality_v0(...)

; 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 @toupper(i32 noundef) local_unnamed_addr #4

; 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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #5

; 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 = { 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 = { "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 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 #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 = { nounwind }
attributes #7 = { 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 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}


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