; LLVM IR from AnneLivia/Competitive-Programming :: Online Judges/URI/1875 (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" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca i8, align 1
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #4
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  br label %10

10:                                               ; preds = %174, %0
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = add nsw i32 %11, -1
  store i32 %12, ptr %2, align 4, !tbaa !5
  %13 = icmp ne i32 %11, 0
  br i1 %13, label %14, label %175

14:                                               ; preds = %10
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %6)
  store i32 0, ptr %5, align 4, !tbaa !5
  store i32 0, ptr %4, align 4, !tbaa !5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %103, %14
  %17 = load i32, ptr %6, align 4, !tbaa !5
  %18 = add nsw i32 %17, -1
  store i32 %18, ptr %6, align 4, !tbaa !5
  %19 = icmp ne i32 %17, 0
  br i1 %19, label %20, label %104

20:                                               ; preds = %16
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %7)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 1 dereferenceable(1) %8)
  %23 = load i8, ptr %7, align 1, !tbaa !9
  %24 = sext i8 %23 to i32
  %25 = icmp eq i32 %24, 71
  br i1 %25, label %26, label %30

26:                                               ; preds = %20
  %27 = load i8, ptr %8, align 1, !tbaa !9
  %28 = sext i8 %27 to i32
  %29 = icmp eq i32 %28, 82
  br i1 %29, label %38, label %30

30:                                               ; preds = %26, %20
  %31 = load i8, ptr %7, align 1, !tbaa !9
  %32 = sext i8 %31 to i32
  %33 = icmp eq i32 %32, 71
  br i1 %33, label %34, label %49

34:                                               ; preds = %30
  %35 = load i8, ptr %8, align 1, !tbaa !9
  %36 = sext i8 %35 to i32
  %37 = icmp eq i32 %36, 66
  br i1 %37, label %38, label %49

38:                                               ; preds = %34, %26
  %39 = load i8, ptr %8, align 1, !tbaa !9
  %40 = sext i8 %39 to i32
  %41 = icmp eq i32 %40, 66
  br i1 %41, label %42, label %45

42:                                               ; preds = %38
  %43 = load i32, ptr %4, align 4, !tbaa !5
  %44 = add nsw i32 %43, 2
  store i32 %44, ptr %4, align 4, !tbaa !5
  br label %48

45:                                               ; preds = %38
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %4, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %45, %42
  br label %49

49:                                               ; preds = %48, %34, %30
  %50 = load i8, ptr %7, align 1, !tbaa !9
  %51 = sext i8 %50 to i32
  %52 = icmp eq i32 %51, 82
  br i1 %52, label %53, label %57

53:                                               ; preds = %49
  %54 = load i8, ptr %8, align 1, !tbaa !9
  %55 = sext i8 %54 to i32
  %56 = icmp eq i32 %55, 71
  br i1 %56, label %65, label %57

57:                                               ; preds = %53, %49
  %58 = load i8, ptr %7, align 1, !tbaa !9
  %59 = sext i8 %58 to i32
  %60 = icmp eq i32 %59, 82
  br i1 %60, label %61, label %76

61:                                               ; preds = %57
  %62 = load i8, ptr %8, align 1, !tbaa !9
  %63 = sext i8 %62 to i32
  %64 = icmp eq i32 %63, 66
  br i1 %64, label %65, label %76

65:                                               ; preds = %61, %53
  %66 = load i8, ptr %8, align 1, !tbaa !9
  %67 = sext i8 %66 to i32
  %68 = icmp eq i32 %67, 71
  br i1 %68, label %69, label %72

69:                                               ; preds = %65
  %70 = load i32, ptr %3, align 4, !tbaa !5
  %71 = add nsw i32 %70, 2
  store i32 %71, ptr %3, align 4, !tbaa !5
  br label %75

72:                                               ; preds = %65
  %73 = load i32, ptr %3, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %3, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %72, %69
  br label %76

76:                                               ; preds = %75, %61, %57
  %77 = load i8, ptr %7, align 1, !tbaa !9
  %78 = sext i8 %77 to i32
  %79 = icmp eq i32 %78, 66
  br i1 %79, label %80, label %84

80:                                               ; preds = %76
  %81 = load i8, ptr %8, align 1, !tbaa !9
  %82 = sext i8 %81 to i32
  %83 = icmp eq i32 %82, 82
  br i1 %83, label %92, label %84

84:                                               ; preds = %80, %76
  %85 = load i8, ptr %7, align 1, !tbaa !9
  %86 = sext i8 %85 to i32
  %87 = icmp eq i32 %86, 66
  br i1 %87, label %88, label %103

88:                                               ; preds = %84
  %89 = load i8, ptr %8, align 1, !tbaa !9
  %90 = sext i8 %89 to i32
  %91 = icmp eq i32 %90, 71
  br i1 %91, label %92, label %103

92:                                               ; preds = %88, %80
  %93 = load i8, ptr %8, align 1, !tbaa !9
  %94 = sext i8 %93 to i32
  %95 = icmp eq i32 %94, 82
  br i1 %95, label %96, label %99

96:                                               ; preds = %92
  %97 = load i32, ptr %5, align 4, !tbaa !5
  %98 = add nsw i32 %97, 2
  store i32 %98, ptr %5, align 4, !tbaa !5
  br label %102

99:                                               ; preds = %92
  %100 = load i32, ptr %5, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %5, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %99, %96
  br label %103

103:                                              ; preds = %102, %88, %84
  br label %16, !llvm.loop !10

104:                                              ; preds = %16
  %105 = load i32, ptr %4, align 4, !tbaa !5
  %106 = load i32, ptr %3, align 4, !tbaa !5
  %107 = icmp sgt i32 %105, %106
  br i1 %107, label %108, label %114

108:                                              ; preds = %104
  %109 = load i32, ptr %4, align 4, !tbaa !5
  %110 = load i32, ptr %5, align 4, !tbaa !5
  %111 = icmp sgt i32 %109, %110
  br i1 %111, label %112, label %114

112:                                              ; preds = %108
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %174

114:                                              ; preds = %108, %104
  %115 = load i32, ptr %3, align 4, !tbaa !5
  %116 = load i32, ptr %4, align 4, !tbaa !5
  %117 = icmp sgt i32 %115, %116
  br i1 %117, label %118, label %124

118:                                              ; preds = %114
  %119 = load i32, ptr %3, align 4, !tbaa !5
  %120 = load i32, ptr %5, align 4, !tbaa !5
  %121 = icmp sgt i32 %119, %120
  br i1 %121, label %122, label %124

122:                                              ; preds = %118
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  br label %173

124:                                              ; preds = %118, %114
  %125 = load i32, ptr %5, align 4, !tbaa !5
  %126 = load i32, ptr %4, align 4, !tbaa !5
  %127 = icmp sgt i32 %125, %126
  br i1 %127, label %128, label %134

128:                                              ; preds = %124
  %129 = load i32, ptr %5, align 4, !tbaa !5
  %130 = load i32, ptr %3, align 4, !tbaa !5
  %131 = icmp sgt i32 %129, %130
  br i1 %131, label %132, label %134

132:                                              ; preds = %128
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  br label %172

134:                                              ; preds = %128, %124
  %135 = load i32, ptr %4, align 4, !tbaa !5
  %136 = load i32, ptr %5, align 4, !tbaa !5
  %137 = icmp eq i32 %135, %136
  br i1 %137, label %138, label %144

138:                                              ; preds = %134
  %139 = load i32, ptr %4, align 4, !tbaa !5
  %140 = load i32, ptr %3, align 4, !tbaa !5
  %141 = icmp eq i32 %139, %140
  br i1 %141, label %142, label %144

142:                                              ; preds = %138
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  br label %171

144:                                              ; preds = %138, %134
  %145 = load i32, ptr %4, align 4, !tbaa !5
  %146 = load i32, ptr %5, align 4, !tbaa !5
  %147 = icmp eq i32 %145, %146
  br i1 %147, label %148, label %152

148:                                              ; preds = %144
  %149 = load i32, ptr %4, align 4, !tbaa !5
  %150 = load i32, ptr %3, align 4, !tbaa !5
  %151 = icmp ne i32 %149, %150
  br i1 %151, label %168, label %152

152:                                              ; preds = %148, %144
  %153 = load i32, ptr %4, align 4, !tbaa !5
  %154 = load i32, ptr %3, align 4, !tbaa !5
  %155 = icmp eq i32 %153, %154
  br i1 %155, label %156, label %160

156:                                              ; preds = %152
  %157 = load i32, ptr %4, align 4, !tbaa !5
  %158 = load i32, ptr %5, align 4, !tbaa !5
  %159 = icmp ne i32 %157, %158
  br i1 %159, label %168, label %160

160:                                              ; preds = %156, %152
  %161 = load i32, ptr %3, align 4, !tbaa !5
  %162 = load i32, ptr %5, align 4, !tbaa !5
  %163 = icmp eq i32 %161, %162
  br i1 %163, label %164, label %170

164:                                              ; preds = %160
  %165 = load i32, ptr %3, align 4, !tbaa !5
  %166 = load i32, ptr %4, align 4, !tbaa !5
  %167 = icmp ne i32 %165, %166
  br i1 %167, label %168, label %170

168:                                              ; preds = %164, %156, %148
  %169 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
  br label %170

170:                                              ; preds = %168, %164, %160
  br label %171

171:                                              ; preds = %170, %142
  br label %172

172:                                              ; preds = %171, %132
  br label %173

173:                                              ; preds = %172, %122
  br label %174

174:                                              ; preds = %173, %112
  br label %10, !llvm.loop !12

175:                                              ; preds = %10
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  ret i32 0
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) #2

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

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

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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i8, align 1
  %4 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #4
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %6 = load i32, ptr %1, align 4, !tbaa !5
  %7 = add nsw i32 %6, -1
  store i32 %7, ptr %1, align 4, !tbaa !5
  %.not78 = icmp eq i32 %6, 0
  br i1 %.not78, label %._crit_edge81, label %.lr.ph80

.lr.ph80:                                         ; preds = %0, %58
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %9 = load i32, ptr %2, align 4, !tbaa !5
  %10 = add nsw i32 %9, -1
  store i32 %10, ptr %2, align 4, !tbaa !5
  %.not5572 = icmp eq i32 %9, 0
  br i1 %.not5572, label %.thread107, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph80, %.thread86
  %.075 = phi i32 [ %.1, %.thread86 ], [ 0, %.lr.ph80 ]
  %.05174 = phi i32 [ %.1528490, %.thread86 ], [ 0, %.lr.ph80 ]
  %.05373 = phi i32 [ %.15491, %.thread86 ], [ 0, %.lr.ph80 ]
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %3)
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 1 dereferenceable(1) %4)
  %13 = load i8, ptr %3, align 1, !tbaa !9
  %14 = icmp eq i8 %13, 71
  %15 = load i8, ptr %4, align 1
  %16 = icmp eq i8 %15, 82
  %17 = icmp eq i8 %15, 66
  %18 = or i1 %16, %17
  %or.cond59 = select i1 %14, i1 %18, i1 false
  br i1 %or.cond59, label %19, label %24

19:                                               ; preds = %.lr.ph
  br i1 %17, label %20, label %22

20:                                               ; preds = %19
  %21 = add nsw i32 %.05174, 2
  br label %.thread86

22:                                               ; preds = %19
  %23 = add nsw i32 %.05174, 1
  br label %.thread86

24:                                               ; preds = %.lr.ph
  %25 = icmp eq i8 %13, 82
  %26 = icmp eq i8 %15, 71
  %27 = or i1 %26, %17
  %or.cond60 = select i1 %25, i1 %27, i1 false
  br i1 %or.cond60, label %28, label %33

28:                                               ; preds = %24
  br i1 %26, label %29, label %31

29:                                               ; preds = %28
  %30 = add nsw i32 %.05373, 2
  br label %.thread86

31:                                               ; preds = %28
  %32 = add nsw i32 %.05373, 1
  br label %.thread86

33:                                               ; preds = %24
  %34 = icmp eq i8 %13, 66
  %35 = or i1 %16, %26
  %or.cond61 = select i1 %34, i1 %35, i1 false
  br i1 %or.cond61, label %36, label %.thread86

36:                                               ; preds = %33
  br i1 %16, label %37, label %39

37:                                               ; preds = %36
  %38 = add nsw i32 %.075, 2
  br label %.thread86

39:                                               ; preds = %36
  %40 = add nsw i32 %.075, 1
  br label %.thread86

.thread86:                                        ; preds = %22, %20, %31, %29, %33, %37, %39
  %.15491 = phi i32 [ %.05373, %37 ], [ %.05373, %39 ], [ %.05373, %33 ], [ %32, %31 ], [ %30, %29 ], [ %.05373, %20 ], [ %.05373, %22 ]
  %.1528490 = phi i32 [ %.05174, %37 ], [ %.05174, %39 ], [ %.05174, %33 ], [ %.05174, %31 ], [ %.05174, %29 ], [ %21, %20 ], [ %23, %22 ]
  %.1 = phi i32 [ %38, %37 ], [ %40, %39 ], [ %.075, %33 ], [ %.075, %31 ], [ %.075, %29 ], [ %.075, %20 ], [ %.075, %22 ]
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = add nsw i32 %41, -1
  store i32 %42, ptr %2, align 4, !tbaa !5
  %.not55 = icmp eq i32 %41, 0
  br i1 %.not55, label %._crit_edge, label %.lr.ph, !llvm.loop !10

._crit_edge:                                      ; preds = %.thread86
  %43 = icmp sgt i32 %.1528490, %.15491
  %44 = icmp sgt i32 %.1528490, %.1
  %or.cond62 = select i1 %43, i1 %44, i1 false
  br i1 %or.cond62, label %.sink.split, label %45

45:                                               ; preds = %._crit_edge
  %46 = icmp sgt i32 %.15491, %.1528490
  %47 = icmp sgt i32 %.15491, %.1
  %or.cond63 = select i1 %46, i1 %47, i1 false
  br i1 %or.cond63, label %.sink.split, label %48

48:                                               ; preds = %45
  %49 = icmp sgt i32 %.1, %.1528490
  %50 = icmp sgt i32 %.1, %.15491
  %or.cond64 = and i1 %49, %50
  br i1 %or.cond64, label %.sink.split, label %.thread107

.thread107:                                       ; preds = %.lr.ph80, %48
  %.0.lcssa98104114 = phi i32 [ %.1, %48 ], [ 0, %.lr.ph80 ]
  %.051.lcssa97105113 = phi i32 [ %.1528490, %48 ], [ 0, %.lr.ph80 ]
  %.053.lcssa96106112 = phi i32 [ %.15491, %48 ], [ 0, %.lr.ph80 ]
  %51 = icmp eq i32 %.051.lcssa97105113, %.0.lcssa98104114
  %52 = icmp eq i32 %.051.lcssa97105113, %.053.lcssa96106112
  %or.cond65 = and i1 %51, %52
  br i1 %or.cond65, label %.sink.split, label %53

53:                                               ; preds = %.thread107
  %.not66 = xor i1 %51, true
  %or.cond67 = or i1 %52, %.not66
  %54 = icmp ne i32 %.051.lcssa97105113, %.053.lcssa96106112
  %or.cond68 = or i1 %54, %51
  %55 = icmp ne i32 %.053.lcssa96106112, %.0.lcssa98104114
  %or.cond69 = or i1 %55, %52
  %56 = and i1 %or.cond68, %or.cond69
  %or.cond71 = and i1 %or.cond67, %56
  br i1 %or.cond71, label %58, label %.sink.split

.sink.split:                                      ; preds = %53, %.thread107, %48, %45, %._crit_edge
  %.str.1.sink = phi ptr [ @.str, %._crit_edge ], [ @.str.1, %45 ], [ @.str.2, %48 ], [ @.str.3, %.thread107 ], [ @.str.4, %53 ]
  %57 = call 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.sink)
  br label %58

58:                                               ; preds = %.sink.split, %53
  %59 = load i32, ptr %1, align 4, !tbaa !5
  %60 = add nsw i32 %59, -1
  store i32 %60, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %59, 0
  br i1 %.not, label %._crit_edge81, label %.lr.ph80, !llvm.loop !12

._crit_edge81:                                    ; preds = %58, %0
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret i32 0
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2

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

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass