; LLVM IR from Algo-Phantoms/Algo-Tree :: Code/C++/spiral_print.ll (Z11spiralprintPA30_iii)

; 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 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11spiralprintPA30_iii(ptr noundef %0, i32 noundef %1, i32 noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %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
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %16 = load i32, ptr %5, align 4, !tbaa !9
  %17 = sub nsw i32 %16, 1
  store i32 %17, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %18 = load i32, ptr %6, align 4, !tbaa !9
  %19 = sub nsw i32 %18, 1
  store i32 %19, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %145, %3
  %21 = load i32, ptr %11, align 4, !tbaa !9
  %22 = load i32, ptr %5, align 4, !tbaa !9
  %23 = load i32, ptr %6, align 4, !tbaa !9
  %24 = mul nsw i32 %22, %23
  %25 = icmp slt i32 %21, %24
  br i1 %25, label %26, label %148

26:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %27 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %27, ptr %12, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %46, %26
  %29 = load i32, ptr %12, align 4, !tbaa !9
  %30 = load i32, ptr %10, align 4, !tbaa !9
  %31 = icmp sle i32 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %49

33:                                               ; preds = %28
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = load i32, ptr %7, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [30 x i32], ptr %34, i64 %36
  %38 = load i32, ptr %12, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [30 x i32], ptr %37, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %41)
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef @.str)
  %44 = load i32, ptr %11, align 4, !tbaa !9
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %11, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %33
  %47 = load i32, ptr %12, align 4, !tbaa !9
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %12, align 4, !tbaa !9
  br label %28, !llvm.loop !11

49:                                               ; preds = %32
  %50 = load i32, ptr %7, align 4, !tbaa !9
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %7, align 4, !tbaa !9
  %52 = load i32, ptr %11, align 4, !tbaa !9
  %53 = load i32, ptr %5, align 4, !tbaa !9
  %54 = load i32, ptr %6, align 4, !tbaa !9
  %55 = mul nsw i32 %53, %54
  %56 = icmp eq i32 %52, %55
  br i1 %56, label %57, label %58

57:                                               ; preds = %49
  br label %148

58:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %59 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %59, ptr %13, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %78, %58
  %61 = load i32, ptr %13, align 4, !tbaa !9
  %62 = load i32, ptr %8, align 4, !tbaa !9
  %63 = icmp sle i32 %61, %62
  br i1 %63, label %65, label %64

64:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %81

65:                                               ; preds = %60
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = load i32, ptr %13, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [30 x i32], ptr %66, i64 %68
  %70 = load i32, ptr %10, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [30 x i32], ptr %69, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !9
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %73)
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef @.str)
  %76 = load i32, ptr %11, align 4, !tbaa !9
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %11, align 4, !tbaa !9
  br label %78

78:                                               ; preds = %65
  %79 = load i32, ptr %13, align 4, !tbaa !9
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %13, align 4, !tbaa !9
  br label %60, !llvm.loop !13

81:                                               ; preds = %64
  %82 = load i32, ptr %10, align 4, !tbaa !9
  %83 = add nsw i32 %82, -1
  store i32 %83, ptr %10, align 4, !tbaa !9
  %84 = load i32, ptr %11, align 4, !tbaa !9
  %85 = load i32, ptr %5, align 4, !tbaa !9
  %86 = load i32, ptr %6, align 4, !tbaa !9
  %87 = mul nsw i32 %85, %86
  %88 = icmp eq i32 %84, %87
  br i1 %88, label %89, label %90

89:                                               ; preds = %81
  br label %148

90:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %91 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %91, ptr %14, align 4, !tbaa !9
  br label %92

92:                                               ; preds = %110, %90
  %93 = load i32, ptr %14, align 4, !tbaa !9
  %94 = load i32, ptr %9, align 4, !tbaa !9
  %95 = icmp sge i32 %93, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %113

97:                                               ; preds = %92
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = load i32, ptr %8, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [30 x i32], ptr %98, i64 %100
  %102 = load i32, ptr %14, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [30 x i32], ptr %101, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !9
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %105)
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef @.str)
  %108 = load i32, ptr %11, align 4, !tbaa !9
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %11, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %97
  %111 = load i32, ptr %14, align 4, !tbaa !9
  %112 = add nsw i32 %111, -1
  store i32 %112, ptr %14, align 4, !tbaa !9
  br label %92, !llvm.loop !14

113:                                              ; preds = %96
  %114 = load i32, ptr %8, align 4, !tbaa !9
  %115 = add nsw i32 %114, -1
  store i32 %115, ptr %8, align 4, !tbaa !9
  %116 = load i32, ptr %11, align 4, !tbaa !9
  %117 = load i32, ptr %5, align 4, !tbaa !9
  %118 = load i32, ptr %6, align 4, !tbaa !9
  %119 = mul nsw i32 %117, %118
  %120 = icmp eq i32 %116, %119
  br i1 %120, label %121, label %122

121:                                              ; preds = %113
  br label %148

122:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %123 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %123, ptr %15, align 4, !tbaa !9
  br label %124

124:                                              ; preds = %142, %122
  %125 = load i32, ptr %15, align 4, !tbaa !9
  %126 = load i32, ptr %7, align 4, !tbaa !9
  %127 = icmp sge i32 %125, %126
  br i1 %127, label %129, label %128

128:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %145

129:                                              ; preds = %124
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  %131 = load i32, ptr %15, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [30 x i32], ptr %130, i64 %132
  %134 = load i32, ptr %9, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [30 x i32], ptr %133, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !9
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %137)
  %139 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %138, ptr noundef @.str)
  %140 = load i32, ptr %11, align 4, !tbaa !9
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %11, align 4, !tbaa !9
  br label %142

142:                                              ; preds = %129
  %143 = load i32, ptr %15, align 4, !tbaa !9
  %144 = add nsw i32 %143, -1
  store i32 %144, ptr %15, align 4, !tbaa !9
  br label %124, !llvm.loop !15

145:                                              ; preds = %128
  %146 = load i32, ptr %9, align 4, !tbaa !9
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %9, align 4, !tbaa !9
  br label %20, !llvm.loop !16

148:                                              ; preds = %121, %89, %57, %20
  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.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 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 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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !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 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11spiralprintPA30_iii(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = mul nsw i32 %2, %1
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.preheader64.preheader, label %._crit_edge91

.preheader64.preheader:                           ; preds = %3
  %6 = add i32 %2, -1
  %7 = add i32 %1, -1
  %8 = add i32 %2, -2
  %9 = add i32 %1, -2
  %10 = sext i32 %6 to i64
  %11 = sext i32 %7 to i64
  br label %.preheader64

.preheader64:                                     ; preds = %.preheader64.preheader, %._crit_edge84
  %indvars.iv129 = phi i64 [ %11, %.preheader64.preheader ], [ %indvars.iv.next130, %._crit_edge84 ]
  %indvars.iv127 = phi i64 [ %10, %.preheader64.preheader ], [ %indvars.iv.next128, %._crit_edge84 ]
  %indvars.iv124 = phi i32 [ %9, %.preheader64.preheader ], [ %indvars.iv.next125, %._crit_edge84 ]
  %indvars.iv120 = phi i32 [ %9, %.preheader64.preheader ], [ %indvars.iv.next121, %._crit_edge84 ]
  %indvars.iv115 = phi i32 [ %8, %.preheader64.preheader ], [ %indvars.iv.next116, %._crit_edge84 ]
  %indvars.iv112 = phi i32 [ %1, %.preheader64.preheader ], [ %indvars.iv.next113, %._crit_edge84 ]
  %indvars.iv109 = phi i32 [ %7, %.preheader64.preheader ], [ %indvars.iv.next110, %._crit_edge84 ]
  %indvars.iv105 = phi i64 [ 1, %.preheader64.preheader ], [ %indvars.iv.next106, %._crit_edge84 ]
  %indvars.iv103 = phi i32 [ %2, %.preheader64.preheader ], [ %indvars.iv.next104, %._crit_edge84 ]
  %indvars.iv100 = phi i32 [ %2, %.preheader64.preheader ], [ %indvars.iv.next101, %._crit_edge84 ]
  %indvars.iv = phi i64 [ 0, %.preheader64.preheader ], [ %indvars.iv.next, %._crit_edge84 ]
  %.05290 = phi i32 [ 0, %.preheader64.preheader ], [ %.4.lcssa, %._crit_edge84 ]
  %12 = sext i32 %indvars.iv120 to i64
  %13 = sext i32 %indvars.iv115 to i64
  %.not65 = icmp sgt i64 %indvars.iv, %indvars.iv127
  br i1 %.not65, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader64
  %wide.trip.count = zext i32 %indvars.iv103 to i64
  br label %16

._crit_edge.loopexit:                             ; preds = %16
  %14 = add i32 %.05290, %indvars.iv100
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader64
  %.1.lcssa = phi i32 [ %.05290, %.preheader64 ], [ %14, %._crit_edge.loopexit ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %15 = icmp eq i32 %.1.lcssa, %4
  br i1 %15, label %._crit_edge91, label %.preheader63

.preheader63:                                     ; preds = %._crit_edge
  %.not5968.not = icmp slt i64 %indvars.iv, %indvars.iv129
  br i1 %.not5968.not, label %.lr.ph71, label %._crit_edge72

16:                                               ; preds = %.lr.ph, %16
  %indvars.iv98 = phi i64 [ %indvars.iv, %.lr.ph ], [ %indvars.iv.next99, %16 ]
  %17 = getelementptr inbounds [30 x i32], ptr %0, i64 %indvars.iv, i64 %indvars.iv98
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %18)
  %20 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull @.str)
  %indvars.iv.next99 = add nuw i64 %indvars.iv98, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next99, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %16, !llvm.loop !9

._crit_edge72.loopexit:                           ; preds = %.lr.ph71
  %21 = add i32 %.1.lcssa, %indvars.iv109
  br label %._crit_edge72

._crit_edge72:                                    ; preds = %._crit_edge72.loopexit, %.preheader63
  %.2.lcssa = phi i32 [ %.1.lcssa, %.preheader63 ], [ %21, %._crit_edge72.loopexit ]
  %indvars.iv.next128 = add nsw i64 %indvars.iv127, -1
  %22 = icmp eq i32 %.2.lcssa, %4
  br i1 %22, label %._crit_edge91, label %.preheader62

.preheader62:                                     ; preds = %._crit_edge72
  %.not6074.not = icmp sgt i64 %indvars.iv127, %indvars.iv
  br i1 %.not6074.not, label %.lr.ph77, label %._crit_edge78

.lr.ph71:                                         ; preds = %.preheader63, %.lr.ph71
  %indvars.iv107 = phi i64 [ %indvars.iv.next108, %.lr.ph71 ], [ %indvars.iv105, %.preheader63 ]
  %23 = getelementptr inbounds [30 x i32], ptr %0, i64 %indvars.iv107, i64 %indvars.iv127
  %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)
  %indvars.iv.next108 = add i64 %indvars.iv107, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next108 to i32
  %exitcond114.not = icmp eq i32 %indvars.iv112, %lftr.wideiv
  br i1 %exitcond114.not, label %._crit_edge72.loopexit, label %.lr.ph71, !llvm.loop !11

._crit_edge78:                                    ; preds = %.lr.ph77, %.preheader62
  %.3.lcssa = phi i32 [ %.2.lcssa, %.preheader62 ], [ %32, %.lr.ph77 ]
  %indvars.iv.next130 = add nsw i64 %indvars.iv129, -1
  %27 = icmp eq i32 %.3.lcssa, %4
  br i1 %27, label %._crit_edge91, label %.preheader

.preheader:                                       ; preds = %._crit_edge78
  %.not61.not80 = icmp sgt i64 %indvars.iv.next130, %indvars.iv
  br i1 %.not61.not80, label %.lr.ph83, label %._crit_edge84

.lr.ph77:                                         ; preds = %.preheader62, %.lr.ph77
  %indvars.iv117 = phi i64 [ %indvars.iv.next118, %.lr.ph77 ], [ %13, %.preheader62 ]
  %.375 = phi i32 [ %32, %.lr.ph77 ], [ %.2.lcssa, %.preheader62 ]
  %28 = getelementptr inbounds [30 x i32], ptr %0, i64 %indvars.iv129, i64 %indvars.iv117
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %29)
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull @.str)
  %32 = add nsw i32 %.375, 1
  %indvars.iv.next118 = add nsw i64 %indvars.iv117, -1
  %.not60.not = icmp sgt i64 %indvars.iv117, %indvars.iv
  br i1 %.not60.not, label %.lr.ph77, label %._crit_edge78, !llvm.loop !12

._crit_edge84.loopexit:                           ; preds = %.lr.ph83
  %33 = add i32 %.3.lcssa, %indvars.iv124
  br label %._crit_edge84

._crit_edge84:                                    ; preds = %._crit_edge84.loopexit, %.preheader
  %.4.lcssa = phi i32 [ %.3.lcssa, %.preheader ], [ %33, %._crit_edge84.loopexit ]
  %34 = icmp slt i32 %.4.lcssa, %4
  %indvars.iv.next101 = add i32 %indvars.iv100, -2
  %indvars.iv.next104 = add i32 %indvars.iv103, -1
  %indvars.iv.next106 = add nuw i64 %indvars.iv105, 1
  %indvars.iv.next110 = add i32 %indvars.iv109, -2
  %indvars.iv.next113 = add i32 %indvars.iv112, -1
  %indvars.iv.next116 = add i32 %indvars.iv115, -1
  %indvars.iv.next121 = add i32 %indvars.iv120, -1
  %indvars.iv.next125 = add i32 %indvars.iv124, -2
  br i1 %34, label %.preheader64, label %._crit_edge91, !llvm.loop !13

.lr.ph83:                                         ; preds = %.preheader, %.lr.ph83
  %indvars.iv122 = phi i64 [ %indvars.iv.next123, %.lr.ph83 ], [ %12, %.preheader ]
  %35 = getelementptr inbounds [30 x i32], ptr %0, i64 %indvars.iv122, 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)
  %indvars.iv.next123 = add nsw i64 %indvars.iv122, -1
  %.not61.not = icmp sgt i64 %indvars.iv.next123, %indvars.iv
  br i1 %.not61.not, label %.lr.ph83, label %._crit_edge84.loopexit, !llvm.loop !14

._crit_edge91:                                    ; preds = %._crit_edge84, %._crit_edge, %._crit_edge72, %._crit_edge78, %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: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass