; LLVM IR from AdarshGaur/Competitive-Programming :: SPOJ (CPTTRN2 - Character Patterns (Act 2))

; 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 [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %15 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %16 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %18
  %20 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %19, ptr noundef null)
  %21 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %22 = getelementptr i8, ptr %21, i64 -24
  %23 = load i64, ptr %22, align 8
  %24 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %23
  %25 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %24, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  br label %27

27:                                               ; preds = %146, %144, %0
  %28 = load i64, ptr %2, align 8, !tbaa !8
  %29 = add nsw i64 %28, -1
  store i64 %29, ptr %2, align 8, !tbaa !8
  %30 = icmp ne i64 %28, 0
  br i1 %30, label %31, label %147

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %34 = load i64, ptr %3, align 8, !tbaa !8
  %35 = icmp eq i64 %34, 0
  br i1 %35, label %39, label %36

36:                                               ; preds = %31
  %37 = load i64, ptr %4, align 8, !tbaa !8
  %38 = icmp eq i64 %37, 0
  br i1 %38, label %39, label %41

39:                                               ; preds = %36, %31
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  store i32 2, ptr %5, align 4
  br label %144, !llvm.loop !11

41:                                               ; preds = %36
  %42 = load i64, ptr %3, align 8, !tbaa !8
  %43 = load i64, ptr %4, align 8, !tbaa !8
  %44 = call ptr @llvm.stacksave.p0()
  store ptr %44, ptr %6, align 8
  %45 = mul nuw i64 %42, %43
  %46 = alloca i8, i64 %45, align 16
  store i64 %42, ptr %7, align 8
  store i64 %43, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 0, ptr %9, align 8, !tbaa !8
  br label %47

47:                                               ; preds = %63, %41
  %48 = load i64, ptr %9, align 8, !tbaa !8
  %49 = load i64, ptr %4, align 8, !tbaa !8
  %50 = icmp slt i64 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  store i32 4, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %66

52:                                               ; preds = %47
  %53 = mul nsw i64 0, %43
  %54 = getelementptr inbounds i8, ptr %46, i64 %53
  %55 = load i64, ptr %9, align 8, !tbaa !8
  %56 = getelementptr inbounds i8, ptr %54, i64 %55
  store i8 42, ptr %56, align 1, !tbaa !13
  %57 = load i64, ptr %3, align 8, !tbaa !8
  %58 = sub nsw i64 %57, 1
  %59 = mul nsw i64 %58, %43
  %60 = getelementptr inbounds i8, ptr %46, i64 %59
  %61 = load i64, ptr %9, align 8, !tbaa !8
  %62 = getelementptr inbounds i8, ptr %60, i64 %61
  store i8 42, ptr %62, align 1, !tbaa !13
  br label %63

63:                                               ; preds = %52
  %64 = load i64, ptr %9, align 8, !tbaa !8
  %65 = add nsw i64 %64, 1
  store i64 %65, ptr %9, align 8, !tbaa !8
  br label %47, !llvm.loop !14

66:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 0, ptr %10, align 8, !tbaa !8
  br label %67

67:                                               ; preds = %83, %66
  %68 = load i64, ptr %10, align 8, !tbaa !8
  %69 = load i64, ptr %3, align 8, !tbaa !8
  %70 = icmp slt i64 %68, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %67
  store i32 7, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %86

72:                                               ; preds = %67
  %73 = load i64, ptr %10, align 8, !tbaa !8
  %74 = mul nsw i64 %73, %43
  %75 = getelementptr inbounds i8, ptr %46, i64 %74
  %76 = getelementptr inbounds i8, ptr %75, i64 0
  store i8 42, ptr %76, align 1, !tbaa !13
  %77 = load i64, ptr %10, align 8, !tbaa !8
  %78 = mul nsw i64 %77, %43
  %79 = getelementptr inbounds i8, ptr %46, i64 %78
  %80 = load i64, ptr %4, align 8, !tbaa !8
  %81 = sub nsw i64 %80, 1
  %82 = getelementptr inbounds i8, ptr %79, i64 %81
  store i8 42, ptr %82, align 1, !tbaa !13
  br label %83

83:                                               ; preds = %72
  %84 = load i64, ptr %10, align 8, !tbaa !8
  %85 = add nsw i64 %84, 1
  store i64 %85, ptr %10, align 8, !tbaa !8
  br label %67, !llvm.loop !15

86:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 1, ptr %11, align 8, !tbaa !8
  br label %87

87:                                               ; preds = %110, %86
  %88 = load i64, ptr %11, align 8, !tbaa !8
  %89 = load i64, ptr %3, align 8, !tbaa !8
  %90 = sub nsw i64 %89, 1
  %91 = icmp slt i64 %88, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %87
  store i32 10, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %113

93:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store i64 1, ptr %12, align 8, !tbaa !8
  br label %94

94:                                               ; preds = %106, %93
  %95 = load i64, ptr %12, align 8, !tbaa !8
  %96 = load i64, ptr %4, align 8, !tbaa !8
  %97 = sub nsw i64 %96, 1
  %98 = icmp slt i64 %95, %97
  br i1 %98, label %100, label %99

99:                                               ; preds = %94
  store i32 13, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %109

100:                                              ; preds = %94
  %101 = load i64, ptr %11, align 8, !tbaa !8
  %102 = mul nsw i64 %101, %43
  %103 = getelementptr inbounds i8, ptr %46, i64 %102
  %104 = load i64, ptr %12, align 8, !tbaa !8
  %105 = getelementptr inbounds i8, ptr %103, i64 %104
  store i8 46, ptr %105, align 1, !tbaa !13
  br label %106

106:                                              ; preds = %100
  %107 = load i64, ptr %12, align 8, !tbaa !8
  %108 = add nsw i64 %107, 1
  store i64 %108, ptr %12, align 8, !tbaa !8
  br label %94, !llvm.loop !16

109:                                              ; preds = %99
  br label %110

110:                                              ; preds = %109
  %111 = load i64, ptr %11, align 8, !tbaa !8
  %112 = add nsw i64 %111, 1
  store i64 %112, ptr %11, align 8, !tbaa !8
  br label %87, !llvm.loop !17

113:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 0, ptr %13, align 8, !tbaa !8
  br label %114

114:                                              ; preds = %138, %113
  %115 = load i64, ptr %13, align 8, !tbaa !8
  %116 = load i64, ptr %3, align 8, !tbaa !8
  %117 = icmp slt i64 %115, %116
  br i1 %117, label %119, label %118

118:                                              ; preds = %114
  store i32 16, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %141

119:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store i64 0, ptr %14, align 8, !tbaa !8
  br label %120

120:                                              ; preds = %133, %119
  %121 = load i64, ptr %14, align 8, !tbaa !8
  %122 = load i64, ptr %4, align 8, !tbaa !8
  %123 = icmp slt i64 %121, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %120
  store i32 19, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %136

125:                                              ; preds = %120
  %126 = load i64, ptr %13, align 8, !tbaa !8
  %127 = mul nsw i64 %126, %43
  %128 = getelementptr inbounds i8, ptr %46, i64 %127
  %129 = load i64, ptr %14, align 8, !tbaa !8
  %130 = getelementptr inbounds i8, ptr %128, i64 %129
  %131 = load i8, ptr %130, align 1, !tbaa !13
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %131)
  br label %133

133:                                              ; preds = %125
  %134 = load i64, ptr %14, align 8, !tbaa !8
  %135 = add nsw i64 %134, 1
  store i64 %135, ptr %14, align 8, !tbaa !8
  br label %120, !llvm.loop !18

136:                                              ; preds = %124
  %137 = 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 %138

138:                                              ; preds = %136
  %139 = load i64, ptr %13, align 8, !tbaa !8
  %140 = add nsw i64 %139, 1
  store i64 %140, ptr %13, align 8, !tbaa !8
  br label %114, !llvm.loop !19

141:                                              ; preds = %118
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %143 = load ptr, ptr %6, align 8
  call void @llvm.stackrestore.p0(ptr %143)
  store i32 0, ptr %5, align 4
  br label %144

144:                                              ; preds = %141, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  %145 = load i32, ptr %5, align 4
  switch i32 %145, label %149 [
    i32 0, label %146
    i32 2, label %27
  ]

146:                                              ; preds = %144
  br label %27, !llvm.loop !11

147:                                              ; preds = %27
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  %148 = load i32, ptr %1, align 4
  ret i32 %148

149:                                              ; preds = %144
  unreachable
}

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 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) #5

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #6

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #6

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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 = { nocallback nofree nosync nounwind willreturn }
attributes #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}


; 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 [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %5 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %6 = getelementptr i8, ptr %5, i64 -24
  %7 = load i64, ptr %6, align 8
  %8 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %7
  %9 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %8, ptr noundef null)
  %10 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %12
  %14 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %13, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %16 = load i64, ptr %1, align 8, !tbaa !8
  %17 = add nsw i64 %16, -1
  store i64 %17, ptr %1, align 8, !tbaa !8
  %.not45 = icmp eq i64 %16, 0
  br i1 %.not45, label %._crit_edge48, label %.lr.ph47

.lr.ph47:                                         ; preds = %0, %132
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %20 = load i64, ptr %2, align 8, !tbaa !8
  %21 = icmp eq i64 %20, 0
  %22 = load i64, ptr %3, align 8
  %23 = icmp eq i64 %22, 0
  %or.cond = select i1 %21, i1 true, i1 %23
  br i1 %or.cond, label %24, label %26

24:                                               ; preds = %.lr.ph47
  %25 = 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)
  br label %132, !llvm.loop !11

26:                                               ; preds = %.lr.ph47
  %27 = call ptr @llvm.stacksave.p0()
  %28 = mul nuw i64 %22, %20
  %29 = alloca i8, i64 %28, align 16
  %30 = load i64, ptr %3, align 8, !tbaa !8
  %31 = icmp sgt i64 %30, 0
  %.pre = load i64, ptr %2, align 8, !tbaa !8
  br i1 %31, label %iter.check64, label %.preheader32

iter.check64:                                     ; preds = %26
  %32 = add nsw i64 %.pre, -1
  %33 = mul nsw i64 %32, %22
  %34 = getelementptr inbounds i8, ptr %29, i64 %33
  %min.iters.check62 = icmp ult i64 %30, 8
  %diff.check60 = icmp ult i64 %33, 32
  %or.cond88 = select i1 %min.iters.check62, i1 true, i1 %diff.check60
  br i1 %or.cond88, label %vec.epilog.scalar.ph75.preheader, label %vector.main.loop.iter.check66

vector.main.loop.iter.check66:                    ; preds = %iter.check64
  %min.iters.check65 = icmp ult i64 %30, 32
  br i1 %min.iters.check65, label %vec.epilog.ph76, label %vector.ph67

vector.ph67:                                      ; preds = %vector.main.loop.iter.check66
  %n.vec69 = and i64 %30, 9223372036854775776
  br label %vector.body70

vector.body70:                                    ; preds = %vector.body70, %vector.ph67
  %index71 = phi i64 [ 0, %vector.ph67 ], [ %index.next72, %vector.body70 ]
  %35 = getelementptr inbounds i8, ptr %29, i64 %index71
  %36 = getelementptr inbounds i8, ptr %35, i64 16
  store <16 x i8> <i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42>, ptr %35, align 16, !tbaa !13
  store <16 x i8> <i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42>, ptr %36, align 16, !tbaa !13
  %37 = getelementptr inbounds i8, ptr %34, i64 %index71
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  store <16 x i8> <i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42>, ptr %37, align 1, !tbaa !13
  store <16 x i8> <i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42>, ptr %38, align 1, !tbaa !13
  %index.next72 = add nuw i64 %index71, 32
  %39 = icmp eq i64 %index.next72, %n.vec69
  br i1 %39, label %middle.block61, label %vector.body70, !llvm.loop !14

middle.block61:                                   ; preds = %vector.body70
  %cmp.n73 = icmp eq i64 %30, %n.vec69
  br i1 %cmp.n73, label %.preheader32, label %vec.epilog.iter.check77

vec.epilog.iter.check77:                          ; preds = %middle.block61
  %n.vec.remaining78 = and i64 %30, 24
  %min.epilog.iters.check79 = icmp eq i64 %n.vec.remaining78, 0
  br i1 %min.epilog.iters.check79, label %vec.epilog.scalar.ph75.preheader, label %vec.epilog.ph76

vec.epilog.scalar.ph75.preheader:                 ; preds = %vec.epilog.middle.block74, %iter.check64, %vec.epilog.iter.check77
  %.02634.ph = phi i64 [ 0, %iter.check64 ], [ %n.vec69, %vec.epilog.iter.check77 ], [ %n.vec82, %vec.epilog.middle.block74 ]
  %xtraiter = and i64 %30, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %vec.epilog.scalar.ph75.prol.loopexit, label %vec.epilog.scalar.ph75.prol

vec.epilog.scalar.ph75.prol:                      ; preds = %vec.epilog.scalar.ph75.preheader, %vec.epilog.scalar.ph75.prol
  %.02634.prol = phi i64 [ %42, %vec.epilog.scalar.ph75.prol ], [ %.02634.ph, %vec.epilog.scalar.ph75.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %vec.epilog.scalar.ph75.prol ], [ 0, %vec.epilog.scalar.ph75.preheader ]
  %40 = getelementptr inbounds i8, ptr %29, i64 %.02634.prol
  store i8 42, ptr %40, align 1, !tbaa !13
  %41 = getelementptr inbounds i8, ptr %34, i64 %.02634.prol
  store i8 42, ptr %41, align 1, !tbaa !13
  %42 = add nuw nsw i64 %.02634.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %vec.epilog.scalar.ph75.prol.loopexit, label %vec.epilog.scalar.ph75.prol, !llvm.loop !17

vec.epilog.scalar.ph75.prol.loopexit:             ; preds = %vec.epilog.scalar.ph75.prol, %vec.epilog.scalar.ph75.preheader
  %.02634.unr = phi i64 [ %.02634.ph, %vec.epilog.scalar.ph75.preheader ], [ %42, %vec.epilog.scalar.ph75.prol ]
  %43 = sub nsw i64 %.02634.ph, %30
  %44 = icmp ugt i64 %43, -4
  br i1 %44, label %.preheader32, label %vec.epilog.scalar.ph75

vec.epilog.ph76:                                  ; preds = %vector.main.loop.iter.check66, %vec.epilog.iter.check77
  %vec.epilog.resume.val80 = phi i64 [ %n.vec69, %vec.epilog.iter.check77 ], [ 0, %vector.main.loop.iter.check66 ]
  %n.vec82 = and i64 %30, 9223372036854775800
  br label %vec.epilog.vector.body84

vec.epilog.vector.body84:                         ; preds = %vec.epilog.vector.body84, %vec.epilog.ph76
  %index85 = phi i64 [ %vec.epilog.resume.val80, %vec.epilog.ph76 ], [ %index.next86, %vec.epilog.vector.body84 ]
  %45 = getelementptr inbounds i8, ptr %29, i64 %index85
  store <8 x i8> <i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42>, ptr %45, align 8, !tbaa !13
  %46 = getelementptr inbounds i8, ptr %34, i64 %index85
  store <8 x i8> <i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42>, ptr %46, align 1, !tbaa !13
  %index.next86 = add nuw i64 %index85, 8
  %47 = icmp eq i64 %index.next86, %n.vec82
  br i1 %47, label %vec.epilog.middle.block74, label %vec.epilog.vector.body84, !llvm.loop !19

vec.epilog.middle.block74:                        ; preds = %vec.epilog.vector.body84
  %cmp.n87 = icmp eq i64 %30, %n.vec82
  br i1 %cmp.n87, label %.preheader32, label %vec.epilog.scalar.ph75.preheader

.preheader32:                                     ; preds = %vec.epilog.scalar.ph75.prol.loopexit, %vec.epilog.scalar.ph75, %middle.block61, %vec.epilog.middle.block74, %26
  %48 = icmp sgt i64 %.pre, 0
  br i1 %48, label %iter.check, label %._crit_edge44

iter.check:                                       ; preds = %.preheader32
  %min.iters.check = icmp ult i64 %.pre, 8
  %ident.check.not = icmp ne i64 %22, 1
  %or.cond89.not91 = select i1 %min.iters.check, i1 true, i1 %ident.check.not
  %49 = add i64 %30, -1
  %diff.check = icmp ult i64 %49, 32
  %or.cond90 = or i1 %or.cond89.not91, %diff.check
  br i1 %or.cond90, label %.lr.ph36.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check53 = icmp ult i64 %.pre, 32
  br i1 %min.iters.check53, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %.pre, 9223372036854775776
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %50 = getelementptr inbounds i8, ptr %29, i64 %index
  %51 = getelementptr inbounds i8, ptr %50, i64 16
  store <16 x i8> <i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42>, ptr %50, align 16, !tbaa !13
  store <16 x i8> <i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42>, ptr %51, align 16, !tbaa !13
  %52 = getelementptr i8, ptr %50, i64 %30
  %53 = getelementptr i8, ptr %52, i64 -1
  %54 = getelementptr i8, ptr %52, i64 15
  store <16 x i8> <i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42>, ptr %53, align 1, !tbaa !13
  store <16 x i8> <i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42>, ptr %54, align 1, !tbaa !13
  %index.next = add nuw i64 %index, 32
  %55 = icmp eq i64 %index.next, %n.vec
  br i1 %55, label %middle.block, label %vector.body, !llvm.loop !20

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %.pre, %n.vec
  br i1 %cmp.n, label %.preheader31, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %n.vec.remaining = and i64 %.pre, 24
  %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check, label %.lr.ph36.preheader, label %vec.epilog.ph

.lr.ph36.preheader:                               ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %.02535.ph = phi i64 [ 0, %iter.check ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec55, %vec.epilog.middle.block ]
  %xtraiter92 = and i64 %.pre, 3
  %lcmp.mod93.not = icmp eq i64 %xtraiter92, 0
  br i1 %lcmp.mod93.not, label %.lr.ph36.prol.loopexit, label %.lr.ph36.prol

.lr.ph36.prol:                                    ; preds = %.lr.ph36.preheader, %.lr.ph36.prol
  %.02535.prol = phi i64 [ %60, %.lr.ph36.prol ], [ %.02535.ph, %.lr.ph36.preheader ]
  %prol.iter94 = phi i64 [ %prol.iter94.next, %.lr.ph36.prol ], [ 0, %.lr.ph36.preheader ]
  %56 = mul nsw i64 %.02535.prol, %22
  %57 = getelementptr inbounds i8, ptr %29, i64 %56
  store i8 42, ptr %57, align 1, !tbaa !13
  %58 = getelementptr i8, ptr %57, i64 %30
  %59 = getelementptr i8, ptr %58, i64 -1
  store i8 42, ptr %59, align 1, !tbaa !13
  %60 = add nuw nsw i64 %.02535.prol, 1
  %prol.iter94.next = add i64 %prol.iter94, 1
  %prol.iter94.cmp.not = icmp eq i64 %prol.iter94.next, %xtraiter92
  br i1 %prol.iter94.cmp.not, label %.lr.ph36.prol.loopexit, label %.lr.ph36.prol, !llvm.loop !21

.lr.ph36.prol.loopexit:                           ; preds = %.lr.ph36.prol, %.lr.ph36.preheader
  %.02535.unr = phi i64 [ %.02535.ph, %.lr.ph36.preheader ], [ %60, %.lr.ph36.prol ]
  %61 = sub nsw i64 %.02535.ph, %.pre
  %62 = icmp ugt i64 %61, -4
  br i1 %62, label %.preheader31, label %.lr.ph36

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec55 = and i64 %.pre, 9223372036854775800
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index56 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next57, %vec.epilog.vector.body ]
  %63 = getelementptr inbounds i8, ptr %29, i64 %index56
  store <8 x i8> <i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42>, ptr %63, align 8, !tbaa !13
  %64 = getelementptr i8, ptr %63, i64 %30
  %65 = getelementptr i8, ptr %64, i64 -1
  store <8 x i8> <i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42>, ptr %65, align 1, !tbaa !13
  %index.next57 = add nuw i64 %index56, 8
  %66 = icmp eq i64 %index.next57, %n.vec55
  br i1 %66, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !22

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n58 = icmp eq i64 %.pre, %n.vec55
  br i1 %cmp.n58, label %.preheader31, label %.lr.ph36.preheader

vec.epilog.scalar.ph75:                           ; preds = %vec.epilog.scalar.ph75.prol.loopexit, %vec.epilog.scalar.ph75
  %.02634 = phi i64 [ %78, %vec.epilog.scalar.ph75 ], [ %.02634.unr, %vec.epilog.scalar.ph75.prol.loopexit ]
  %67 = getelementptr inbounds i8, ptr %29, i64 %.02634
  store i8 42, ptr %67, align 1, !tbaa !13
  %68 = getelementptr inbounds i8, ptr %34, i64 %.02634
  store i8 42, ptr %68, align 1, !tbaa !13
  %69 = add nuw nsw i64 %.02634, 1
  %70 = getelementptr inbounds i8, ptr %29, i64 %69
  store i8 42, ptr %70, align 1, !tbaa !13
  %71 = getelementptr inbounds i8, ptr %34, i64 %69
  store i8 42, ptr %71, align 1, !tbaa !13
  %72 = add nuw nsw i64 %.02634, 2
  %73 = getelementptr inbounds i8, ptr %29, i64 %72
  store i8 42, ptr %73, align 1, !tbaa !13
  %74 = getelementptr inbounds i8, ptr %34, i64 %72
  store i8 42, ptr %74, align 1, !tbaa !13
  %75 = add nuw nsw i64 %.02634, 3
  %76 = getelementptr inbounds i8, ptr %29, i64 %75
  store i8 42, ptr %76, align 1, !tbaa !13
  %77 = getelementptr inbounds i8, ptr %34, i64 %75
  store i8 42, ptr %77, align 1, !tbaa !13
  %78 = add nuw nsw i64 %.02634, 4
  %exitcond.not.3 = icmp eq i64 %78, %30
  br i1 %exitcond.not.3, label %.preheader32, label %vec.epilog.scalar.ph75, !llvm.loop !23

.preheader31:                                     ; preds = %.lr.ph36.prol.loopexit, %.lr.ph36, %vec.epilog.middle.block, %middle.block
  %79 = icmp sgt i64 %.pre, 2
  br i1 %79, label %.preheader29.lr.ph, label %.preheader30

.preheader29.lr.ph:                               ; preds = %.preheader31
  %80 = icmp sgt i64 %30, 2
  br i1 %80, label %.preheader29.us.preheader, label %.preheader.preheader

.preheader29.us.preheader:                        ; preds = %.preheader29.lr.ph
  %81 = add nsw i64 %30, -2
  %82 = getelementptr i8, ptr %29, i64 %22
  %83 = getelementptr i8, ptr %82, i64 1
  %84 = add nsw i64 %.pre, -3
  %85 = add nsw i64 %.pre, -2
  %xtraiter95 = and i64 %85, 7
  %86 = icmp ult i64 %84, 7
  br i1 %86, label %.preheader30.loopexit.unr-lcssa, label %.preheader29.us.preheader.new

.preheader29.us.preheader.new:                    ; preds = %.preheader29.us.preheader
  %unroll_iter = and i64 %85, -8
  br label %.preheader29.us

.preheader29.us:                                  ; preds = %.preheader29.us, %.preheader29.us.preheader.new
  %indvar = phi i64 [ 0, %.preheader29.us.preheader.new ], [ %indvar.next.7, %.preheader29.us ]
  %niter = phi i64 [ 0, %.preheader29.us.preheader.new ], [ %niter.next.7, %.preheader29.us ]
  %87 = mul i64 %22, %indvar
  %scevgep = getelementptr i8, ptr %83, i64 %87
  call void @llvm.memset.p0.i64(ptr align 1 %scevgep, i8 46, i64 %81, i1 false), !tbaa !13
  %indvar.next = or disjoint i64 %indvar, 1
  %88 = mul i64 %22, %indvar.next
  %scevgep.1 = getelementptr i8, ptr %83, i64 %88
  call void @llvm.memset.p0.i64(ptr align 1 %scevgep.1, i8 46, i64 %81, i1 false), !tbaa !13
  %indvar.next.1 = or disjoint i64 %indvar, 2
  %89 = mul i64 %22, %indvar.next.1
  %scevgep.2 = getelementptr i8, ptr %83, i64 %89
  call void @llvm.memset.p0.i64(ptr align 1 %scevgep.2, i8 46, i64 %81, i1 false), !tbaa !13
  %indvar.next.2 = or disjoint i64 %indvar, 3
  %90 = mul i64 %22, %indvar.next.2
  %scevgep.3 = getelementptr i8, ptr %83, i64 %90
  call void @llvm.memset.p0.i64(ptr align 1 %scevgep.3, i8 46, i64 %81, i1 false), !tbaa !13
  %indvar.next.3 = or disjoint i64 %indvar, 4
  %91 = mul i64 %22, %indvar.next.3
  %scevgep.4 = getelementptr i8, ptr %83, i64 %91
  call void @llvm.memset.p0.i64(ptr align 1 %scevgep.4, i8 46, i64 %81, i1 false), !tbaa !13
  %indvar.next.4 = or disjoint i64 %indvar, 5
  %92 = mul i64 %22, %indvar.next.4
  %scevgep.5 = getelementptr i8, ptr %83, i64 %92
  call void @llvm.memset.p0.i64(ptr align 1 %scevgep.5, i8 46, i64 %81, i1 false), !tbaa !13
  %indvar.next.5 = or disjoint i64 %indvar, 6
  %93 = mul i64 %22, %indvar.next.5
  %scevgep.6 = getelementptr i8, ptr %83, i64 %93
  call void @llvm.memset.p0.i64(ptr align 1 %scevgep.6, i8 46, i64 %81, i1 false), !tbaa !13
  %indvar.next.6 = or disjoint i64 %indvar, 7
  %94 = mul i64 %22, %indvar.next.6
  %scevgep.7 = getelementptr i8, ptr %83, i64 %94
  call void @llvm.memset.p0.i64(ptr align 1 %scevgep.7, i8 46, i64 %81, i1 false), !tbaa !13
  %indvar.next.7 = add nuw nsw i64 %indvar, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %.preheader30.loopexit.unr-lcssa, label %.preheader29.us, !llvm.loop !24

.lr.ph36:                                         ; preds = %.lr.ph36.prol.loopexit, %.lr.ph36
  %.02535 = phi i64 [ %114, %.lr.ph36 ], [ %.02535.unr, %.lr.ph36.prol.loopexit ]
  %95 = mul nsw i64 %.02535, %22
  %96 = getelementptr inbounds i8, ptr %29, i64 %95
  store i8 42, ptr %96, align 1, !tbaa !13
  %97 = getelementptr i8, ptr %96, i64 %30
  %98 = getelementptr i8, ptr %97, i64 -1
  store i8 42, ptr %98, align 1, !tbaa !13
  %99 = add nuw nsw i64 %.02535, 1
  %100 = mul nsw i64 %99, %22
  %101 = getelementptr inbounds i8, ptr %29, i64 %100
  store i8 42, ptr %101, align 1, !tbaa !13
  %102 = getelementptr i8, ptr %101, i64 %30
  %103 = getelementptr i8, ptr %102, i64 -1
  store i8 42, ptr %103, align 1, !tbaa !13
  %104 = add nuw nsw i64 %.02535, 2
  %105 = mul nsw i64 %104, %22
  %106 = getelementptr inbounds i8, ptr %29, i64 %105
  store i8 42, ptr %106, align 1, !tbaa !13
  %107 = getelementptr i8, ptr %106, i64 %30
  %108 = getelementptr i8, ptr %107, i64 -1
  store i8 42, ptr %108, align 1, !tbaa !13
  %109 = add nuw nsw i64 %.02535, 3
  %110 = mul nsw i64 %109, %22
  %111 = getelementptr inbounds i8, ptr %29, i64 %110
  store i8 42, ptr %111, align 1, !tbaa !13
  %112 = getelementptr i8, ptr %111, i64 %30
  %113 = getelementptr i8, ptr %112, i64 -1
  store i8 42, ptr %113, align 1, !tbaa !13
  %114 = add nuw nsw i64 %.02535, 4
  %exitcond50.not.3 = icmp eq i64 %114, %.pre
  br i1 %exitcond50.not.3, label %.preheader31, label %.lr.ph36, !llvm.loop !25

.preheader30.loopexit.unr-lcssa:                  ; preds = %.preheader29.us, %.preheader29.us.preheader
  %indvar.unr = phi i64 [ 0, %.preheader29.us.preheader ], [ %indvar.next.7, %.preheader29.us ]
  %lcmp.mod96.not = icmp eq i64 %xtraiter95, 0
  br i1 %lcmp.mod96.not, label %.preheader30, label %.preheader29.us.epil

.preheader29.us.epil:                             ; preds = %.preheader30.loopexit.unr-lcssa, %.preheader29.us.epil
  %indvar.epil = phi i64 [ %indvar.next.epil, %.preheader29.us.epil ], [ %indvar.unr, %.preheader30.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader29.us.epil ], [ 0, %.preheader30.loopexit.unr-lcssa ]
  %115 = mul i64 %22, %indvar.epil
  %scevgep.epil = getelementptr i8, ptr %83, i64 %115
  call void @llvm.memset.p0.i64(ptr align 1 %scevgep.epil, i8 46, i64 %81, i1 false), !tbaa !13
  %indvar.next.epil = add nuw nsw i64 %indvar.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter95
  br i1 %epil.iter.cmp.not, label %.preheader30, label %.preheader29.us.epil, !llvm.loop !26

.preheader30:                                     ; preds = %.preheader30.loopexit.unr-lcssa, %.preheader29.us.epil, %.preheader31
  br i1 %48, label %.preheader.preheader, label %._crit_edge44

.preheader.preheader:                             ; preds = %.preheader29.lr.ph, %.preheader30
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge
  %.02243 = phi i64 [ %122, %._crit_edge ], [ 0, %.preheader.preheader ]
  %116 = load i64, ptr %3, align 8, !tbaa !8
  %117 = icmp sgt i64 %116, 0
  br i1 %117, label %.lr.ph42, label %._crit_edge

.lr.ph42:                                         ; preds = %.preheader
  %118 = mul nsw i64 %.02243, %22
  %119 = getelementptr inbounds i8, ptr %29, i64 %118
  br label %125

._crit_edge44:                                    ; preds = %._crit_edge, %.preheader32, %.preheader30
  %120 = 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)
  call void @llvm.stackrestore.p0(ptr %27)
  br label %132

._crit_edge:                                      ; preds = %125, %.preheader
  %121 = 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)
  %122 = add nuw nsw i64 %.02243, 1
  %123 = load i64, ptr %2, align 8, !tbaa !8
  %124 = icmp slt i64 %122, %123
  br i1 %124, label %.preheader, label %._crit_edge44, !llvm.loop !27

125:                                              ; preds = %.lr.ph42, %125
  %.041 = phi i64 [ 0, %.lr.ph42 ], [ %129, %125 ]
  %126 = getelementptr inbounds i8, ptr %119, i64 %.041
  %127 = load i8, ptr %126, align 1, !tbaa !13
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %127)
  %129 = add nuw nsw i64 %.041, 1
  %130 = load i64, ptr %3, align 8, !tbaa !8
  %131 = icmp slt i64 %129, %130
  br i1 %131, label %125, label %._crit_edge, !llvm.loop !28

132:                                              ; preds = %._crit_edge44, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  %133 = load i64, ptr %1, align 8, !tbaa !8
  %134 = add nsw i64 %133, -1
  store i64 %134, ptr %1, align 8, !tbaa !8
  %.not = icmp eq i64 %133, 0
  br i1 %.not, label %._crit_edge48, label %.lr.ph47

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 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 #5

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #6

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #6

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !12, !15, !16}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.unroll.disable"}
!19 = distinct !{!19, !12, !15, !16}
!20 = distinct !{!20, !12, !15, !16}
!21 = distinct !{!21, !18}
!22 = distinct !{!22, !12, !15, !16}
!23 = distinct !{!23, !12, !15}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12, !15}
!26 = distinct !{!26, !18}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass