; LLVM IR from amritansh22/Data-Structures-and-Algorithms-in-cpp :: SpiralOdereMatrixTraversal.ll (Z16spirallyTraverseiiPA30_i)

; 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_ostream" = type { ptr, %"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 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16spirallyTraverseiiPA30_i(i32 noundef %0, i32 noundef %1, ptr noundef %2) #1 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !5
  %17 = load i32, ptr %5, align 4, !tbaa !5
  %18 = sub nsw i32 %17, 1
  store i32 %18, ptr %8, align 4, !tbaa !5
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = sub nsw i32 %19, 1
  store i32 %20, ptr %9, align 4, !tbaa !5
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %138, %3
  %22 = load i32, ptr %7, align 4, !tbaa !5
  %23 = load i32, ptr %9, align 4, !tbaa !5
  %24 = icmp sle i32 %22, %23
  br i1 %24, label %25, label %29

25:                                               ; preds = %21
  %26 = load i32, ptr %10, align 4, !tbaa !5
  %27 = load i32, ptr %8, align 4, !tbaa !5
  %28 = icmp sle i32 %26, %27
  br label %29

29:                                               ; preds = %25, %21
  %30 = phi i1 [ false, %21 ], [ %28, %25 ]
  br i1 %30, label %31, label %139

31:                                               ; preds = %29
  %32 = load i32, ptr %12, align 4, !tbaa !5
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %34, label %58

34:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %35 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %35, ptr %13, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %52, %34
  %37 = load i32, ptr %13, align 4, !tbaa !5
  %38 = load i32, ptr %8, align 4, !tbaa !5
  %39 = icmp sle i32 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %55

41:                                               ; preds = %36
  %42 = load ptr, ptr %6, align 8, !tbaa !9
  %43 = load i32, ptr %7, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [30 x i32], ptr %42, i64 %44
  %46 = load i32, ptr %13, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [30 x i32], ptr %45, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %49)
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef @.str.1)
  br label %52

52:                                               ; preds = %41
  %53 = load i32, ptr %13, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %13, align 4, !tbaa !5
  br label %36, !llvm.loop !11

55:                                               ; preds = %40
  store i32 1, ptr %12, align 4, !tbaa !5
  %56 = load i32, ptr %7, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %7, align 4, !tbaa !5
  br label %138

58:                                               ; preds = %31
  %59 = load i32, ptr %12, align 4, !tbaa !5
  %60 = icmp eq i32 %59, 1
  br i1 %60, label %61, label %85

61:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %62 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %62, ptr %14, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %79, %61
  %64 = load i32, ptr %14, align 4, !tbaa !5
  %65 = load i32, ptr %9, align 4, !tbaa !5
  %66 = icmp sle i32 %64, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %82

68:                                               ; preds = %63
  %69 = load ptr, ptr %6, align 8, !tbaa !9
  %70 = load i32, ptr %14, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [30 x i32], ptr %69, i64 %71
  %73 = load i32, ptr %8, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [30 x i32], ptr %72, i64 0, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %76)
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef @.str.1)
  br label %79

79:                                               ; preds = %68
  %80 = load i32, ptr %14, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %14, align 4, !tbaa !5
  br label %63, !llvm.loop !13

82:                                               ; preds = %67
  store i32 2, ptr %12, align 4, !tbaa !5
  %83 = load i32, ptr %8, align 4, !tbaa !5
  %84 = add nsw i32 %83, -1
  store i32 %84, ptr %8, align 4, !tbaa !5
  br label %137

85:                                               ; preds = %58
  %86 = load i32, ptr %12, align 4, !tbaa !5
  %87 = icmp eq i32 %86, 2
  br i1 %87, label %88, label %112

88:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %89 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %89, ptr %15, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %106, %88
  %91 = load i32, ptr %15, align 4, !tbaa !5
  %92 = load i32, ptr %10, align 4, !tbaa !5
  %93 = icmp sge i32 %91, %92
  br i1 %93, label %95, label %94

94:                                               ; preds = %90
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %109

95:                                               ; preds = %90
  %96 = load ptr, ptr %6, align 8, !tbaa !9
  %97 = load i32, ptr %9, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [30 x i32], ptr %96, i64 %98
  %100 = load i32, ptr %15, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [30 x i32], ptr %99, i64 0, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %103)
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %104, ptr noundef @.str.1)
  br label %106

106:                                              ; preds = %95
  %107 = load i32, ptr %15, align 4, !tbaa !5
  %108 = add nsw i32 %107, -1
  store i32 %108, ptr %15, align 4, !tbaa !5
  br label %90, !llvm.loop !14

109:                                              ; preds = %94
  store i32 3, ptr %12, align 4, !tbaa !5
  %110 = load i32, ptr %9, align 4, !tbaa !5
  %111 = add nsw i32 %110, -1
  store i32 %111, ptr %9, align 4, !tbaa !5
  br label %136

112:                                              ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %113 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %113, ptr %16, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %130, %112
  %115 = load i32, ptr %16, align 4, !tbaa !5
  %116 = load i32, ptr %7, align 4, !tbaa !5
  %117 = icmp sge i32 %115, %116
  br i1 %117, label %119, label %118

118:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %133

119:                                              ; preds = %114
  %120 = load ptr, ptr %6, align 8, !tbaa !9
  %121 = load i32, ptr %16, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [30 x i32], ptr %120, i64 %122
  %124 = load i32, ptr %10, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [30 x i32], ptr %123, i64 0, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %127)
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %128, ptr noundef @.str.1)
  br label %130

130:                                              ; preds = %119
  %131 = load i32, ptr %16, align 4, !tbaa !5
  %132 = add nsw i32 %131, -1
  store i32 %132, ptr %16, align 4, !tbaa !5
  br label %114, !llvm.loop !15

133:                                              ; preds = %118
  store i32 0, ptr %12, align 4, !tbaa !5
  %134 = load i32, ptr %10, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %10, align 4, !tbaa !5
  br label %136

136:                                              ; preds = %133, %109
  br label %137

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

138:                                              ; preds = %137, %55
  br label %21, !llvm.loop !16

139:                                              ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret void
}

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !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_ostream" = type { ptr, %"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 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16spirallyTraverseiiPA30_i(i32 noundef %0, i32 noundef %1, ptr nocapture noundef readonly %2) local_unnamed_addr #0 {
  %4 = icmp sgt i32 %0, 0
  %5 = icmp sgt i32 %1, 0
  %6 = and i1 %4, %5
  br i1 %6, label %.lr.ph78.preheader, label %._crit_edge79

.lr.ph78.preheader:                               ; preds = %3
  %7 = add nsw i32 %0, -1
  %8 = add nsw i32 %1, -1
  br label %.lr.ph78

.lr.ph78:                                         ; preds = %.lr.ph78.preheader, %45
  %.04376 = phi i32 [ %.1, %45 ], [ 0, %.lr.ph78.preheader ]
  %.04475 = phi i32 [ %.145, %45 ], [ 0, %.lr.ph78.preheader ]
  %.04674 = phi i32 [ %.147, %45 ], [ 0, %.lr.ph78.preheader ]
  %.04873 = phi i32 [ %.149, %45 ], [ %7, %.lr.ph78.preheader ]
  %.05072 = phi i32 [ %.151, %45 ], [ %8, %.lr.ph78.preheader ]
  switch i32 %.04376, label %.preheader [
    i32 0, label %.preheader55
    i32 1, label %.preheader56
    i32 2, label %.preheader57
  ]

.preheader57:                                     ; preds = %.lr.ph78
  %.not5258 = icmp slt i32 %.05072, %.04674
  br i1 %.not5258, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader57
  %9 = sext i32 %.04873 to i64
  %10 = sext i32 %.05072 to i64
  %11 = sext i32 %.04674 to i64
  br label %34

.preheader56:                                     ; preds = %.lr.ph78
  %.not5360 = icmp sgt i32 %.04475, %.04873
  br i1 %.not5360, label %._crit_edge63, label %.lr.ph62

.lr.ph62:                                         ; preds = %.preheader56
  %12 = sext i32 %.05072 to i64
  %13 = sext i32 %.04475 to i64
  %14 = add nsw i32 %.04873, 1
  br label %28

.preheader55:                                     ; preds = %.lr.ph78
  %.not5464 = icmp sgt i32 %.04674, %.05072
  br i1 %.not5464, label %._crit_edge67, label %.lr.ph66

.lr.ph66:                                         ; preds = %.preheader55
  %15 = sext i32 %.04475 to i64
  %16 = sext i32 %.04674 to i64
  %17 = add nsw i32 %.05072, 1
  br label %22

.preheader:                                       ; preds = %.lr.ph78
  %.not68 = icmp slt i32 %.04873, %.04475
  br i1 %.not68, label %._crit_edge71, label %.lr.ph70

.lr.ph70:                                         ; preds = %.preheader
  %18 = sext i32 %.04674 to i64
  %19 = sext i32 %.04873 to i64
  %20 = sext i32 %.04475 to i64
  br label %40

._crit_edge67:                                    ; preds = %22, %.preheader55
  %21 = add nsw i32 %.04475, 1
  br label %45

22:                                               ; preds = %.lr.ph66, %22
  %indvars.iv84 = phi i64 [ %16, %.lr.ph66 ], [ %indvars.iv.next85, %22 ]
  %23 = getelementptr inbounds [30 x i32], ptr %2, i64 %15, i64 %indvars.iv84
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %24)
  %26 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @.str.1)
  %indvars.iv.next85 = add nsw i64 %indvars.iv84, 1
  %lftr.wideiv87 = trunc i64 %indvars.iv.next85 to i32
  %exitcond88.not = icmp eq i32 %17, %lftr.wideiv87
  br i1 %exitcond88.not, label %._crit_edge67, label %22, !llvm.loop !9

._crit_edge63:                                    ; preds = %28, %.preheader56
  %27 = add nsw i32 %.05072, -1
  br label %45

28:                                               ; preds = %.lr.ph62, %28
  %indvars.iv81 = phi i64 [ %13, %.lr.ph62 ], [ %indvars.iv.next82, %28 ]
  %29 = getelementptr inbounds [30 x i32], ptr %2, i64 %indvars.iv81, i64 %12
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %30)
  %32 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull @.str.1)
  %indvars.iv.next82 = add nsw i64 %indvars.iv81, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next82 to i32
  %exitcond.not = icmp eq i32 %14, %lftr.wideiv
  br i1 %exitcond.not, label %._crit_edge63, label %28, !llvm.loop !11

._crit_edge:                                      ; preds = %34, %.preheader57
  %33 = add nsw i32 %.04873, -1
  br label %45

34:                                               ; preds = %.lr.ph, %34
  %indvars.iv = phi i64 [ %10, %.lr.ph ], [ %indvars.iv.next, %34 ]
  %35 = getelementptr inbounds [30 x i32], ptr %2, i64 %9, i64 %indvars.iv
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %36)
  %38 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull @.str.1)
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %.not52.not = icmp sgt i64 %indvars.iv, %11
  br i1 %.not52.not, label %34, label %._crit_edge, !llvm.loop !12

._crit_edge71:                                    ; preds = %40, %.preheader
  %39 = add nsw i32 %.04674, 1
  br label %45

40:                                               ; preds = %.lr.ph70, %40
  %indvars.iv89 = phi i64 [ %19, %.lr.ph70 ], [ %indvars.iv.next90, %40 ]
  %41 = getelementptr inbounds [30 x i32], ptr %2, i64 %indvars.iv89, i64 %18
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %42)
  %44 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull @.str.1)
  %indvars.iv.next90 = add nsw i64 %indvars.iv89, -1
  %.not.not = icmp sgt i64 %indvars.iv89, %20
  br i1 %.not.not, label %40, label %._crit_edge71, !llvm.loop !13

45:                                               ; preds = %._crit_edge63, %._crit_edge71, %._crit_edge, %._crit_edge67
  %.151 = phi i32 [ %.05072, %._crit_edge67 ], [ %27, %._crit_edge63 ], [ %.05072, %._crit_edge ], [ %.05072, %._crit_edge71 ]
  %.149 = phi i32 [ %.04873, %._crit_edge67 ], [ %.04873, %._crit_edge63 ], [ %33, %._crit_edge ], [ %.04873, %._crit_edge71 ]
  %.147 = phi i32 [ %.04674, %._crit_edge67 ], [ %.04674, %._crit_edge63 ], [ %.04674, %._crit_edge ], [ %39, %._crit_edge71 ]
  %.145 = phi i32 [ %21, %._crit_edge67 ], [ %.04475, %._crit_edge63 ], [ %.04475, %._crit_edge ], [ %.04475, %._crit_edge71 ]
  %.1 = phi i32 [ 1, %._crit_edge67 ], [ 2, %._crit_edge63 ], [ 3, %._crit_edge ], [ 0, %._crit_edge71 ]
  %46 = icmp sle i32 %.145, %.149
  %47 = icmp sle i32 %.147, %.151
  %48 = select i1 %46, i1 %47, i1 false
  br i1 %48, label %.lr.ph78, label %._crit_edge79, !llvm.loop !14

._crit_edge79:                                    ; preds = %45, %3
  ret void
}

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2

attributes #0 = { 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 #1 = { 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 #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" }

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


; Effective O3 passes: GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass