; LLVM IR from upupming/algorithm :: acwing/算法基础课/第三讲 搜索与图论/Floyd/854. Floyd求最短路 (main)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@d = external dso_local global [210 x [210 x i32]], align 16
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@x = external dso_local global i32, align 4
@y = external dso_local global i32, align 4
@z = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) @k)
  call void @llvm.memset.p0.i64(ptr align 16 @d, i8 63, i64 176400, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %24, %0
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = load i32, ptr @n, align 4, !tbaa !5
  %15 = icmp sle i32 %13, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %27

17:                                               ; preds = %12
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %19
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [210 x i32], ptr %20, i64 0, i64 %22
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %17
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %2, align 4, !tbaa !5
  br label %12, !llvm.loop !9

27:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %51, %27
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = load i32, ptr @m, align 4, !tbaa !5
  %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 %3) #7
  br label %54

33:                                               ; preds = %28
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @x)
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 4 dereferenceable(4) @y)
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 4 dereferenceable(4) @z)
  %37 = load i32, ptr @x, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %38
  %40 = load i32, ptr @y, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [210 x i32], ptr %39, i64 0, i64 %41
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %42, ptr noundef nonnull align 4 dereferenceable(4) @z)
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = load i32, ptr @x, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %46
  %48 = load i32, ptr @y, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [210 x i32], ptr %47, i64 0, i64 %49
  store i32 %44, ptr %50, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %33
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %3, align 4, !tbaa !5
  br label %28, !llvm.loop !11

54:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %110, %54
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = load i32, ptr @n, align 4, !tbaa !5
  %58 = icmp sle i32 %56, %57
  br i1 %58, label %60, label %59

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

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %106, %60
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = load i32, ptr @n, align 4, !tbaa !5
  %64 = icmp sle i32 %62, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %61
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %109

66:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %67

67:                                               ; preds = %102, %66
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = load i32, ptr @n, align 4, !tbaa !5
  %70 = icmp sle i32 %68, %69
  br i1 %70, label %72, label %71

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

72:                                               ; preds = %67
  %73 = load i32, ptr %6, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %74
  %76 = load i32, ptr %7, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [210 x i32], ptr %75, i64 0, i64 %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %80
  %82 = load i32, ptr %4, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [210 x i32], ptr %81, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = load i32, ptr %4, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %87
  %89 = load i32, ptr %7, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [210 x i32], ptr %88, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = add nsw i32 %85, %92
  store i32 %93, ptr %8, align 4, !tbaa !5
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %78, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = load i32, ptr %6, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %97
  %99 = load i32, ptr %7, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [210 x i32], ptr %98, i64 0, i64 %100
  store i32 %95, ptr %101, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %102

102:                                              ; preds = %72
  %103 = load i32, ptr %7, align 4, !tbaa !5
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %7, align 4, !tbaa !5
  br label %67, !llvm.loop !12

105:                                              ; preds = %71
  br label %106

106:                                              ; preds = %105
  %107 = load i32, ptr %6, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %6, align 4, !tbaa !5
  br label %61, !llvm.loop !13

109:                                              ; preds = %65
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %4, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %4, align 4, !tbaa !5
  br label %55, !llvm.loop !14

113:                                              ; preds = %59
  br label %114

114:                                              ; preds = %141, %113
  %115 = load i32, ptr @k, align 4, !tbaa !5
  %116 = add nsw i32 %115, -1
  store i32 %116, ptr @k, align 4, !tbaa !5
  %117 = icmp ne i32 %115, 0
  br i1 %117, label %118, label %142

118:                                              ; preds = %114
  %119 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @x)
  %120 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %119, ptr noundef nonnull align 4 dereferenceable(4) @y)
  %121 = load i32, ptr @x, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %122
  %124 = load i32, ptr @y, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [210 x i32], ptr %123, i64 0, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %128 = icmp sgt i32 %127, 530554783
  br i1 %128, label %129, label %131

129:                                              ; preds = %118
  %130 = call i32 @puts(ptr noundef @.str)
  br label %141

131:                                              ; preds = %118
  %132 = load i32, ptr @x, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %133
  %135 = load i32, ptr @y, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [210 x i32], ptr %134, i64 0, i64 %136
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %139 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %138)
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %139, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %141

141:                                              ; preds = %131, %129
  br label %114, !llvm.loop !15

142:                                              ; preds = %114
  ret i32 0
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

; 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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

declare i32 @puts(ptr noundef) #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint 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 #5 = { 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 = { 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 #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 = !{!"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}
!15 = distinct !{!15, !10}


; 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" }

@d = external dso_local global [210 x [210 x i32]], align 16
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@x = external dso_local global i32, align 4
@y = external dso_local global i32, align 4
@z = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %3 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %4 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(4) @k)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(176400) @d, i8 63, i64 176400, i1 false)
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %.not34 = icmp slt i32 %5, 1
  br i1 %.not34, label %.preheader33, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %6 = zext nneg i32 %5 to i64
  %xtraiter = and i64 %6, 3
  %7 = icmp ult i32 %5, 4
  br i1 %7, label %.preheader33.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %6, 2147483644
  br label %.lr.ph

.preheader33.loopexit.unr-lcssa:                  ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader33, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader33.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %.preheader33.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %.preheader33.loopexit.unr-lcssa ]
  %8 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %indvars.iv.epil, i64 %indvars.iv.epil
  store i32 0, ptr %8, align 4, !tbaa !5
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader33, label %.lr.ph.epil, !llvm.loop !9

.preheader33:                                     ; preds = %.preheader33.loopexit.unr-lcssa, %.lr.ph.epil, %0
  %9 = load i32, ptr @m, align 4, !tbaa !5
  %.not2536 = icmp slt i32 %9, 1
  br i1 %.not2536, label %.preheader32, label %.lr.ph38

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %10 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %indvars.iv, i64 %indvars.iv
  store i32 0, ptr %10, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %11 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %indvars.iv.next, i64 %indvars.iv.next
  store i32 0, ptr %11, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %12 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %indvars.iv.next.1, i64 %indvars.iv.next.1
  store i32 0, ptr %12, align 4, !tbaa !5
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %13 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %indvars.iv.next.2, i64 %indvars.iv.next.2
  store i32 0, ptr %13, align 4, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader33.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !11

.preheader32.loopexit:                            ; preds = %.lr.ph38
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %.preheader32

.preheader32:                                     ; preds = %.preheader32.loopexit, %.preheader33
  %14 = phi i32 [ %.pre, %.preheader32.loopexit ], [ %5, %.preheader33 ]
  %.not2645 = icmp slt i32 %14, 1
  br i1 %.not2645, label %.preheader, label %.preheader31

.lr.ph38:                                         ; preds = %.preheader33, %.lr.ph38
  %.02237 = phi i32 [ %30, %.lr.ph38 ], [ 1, %.preheader33 ]
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @x)
  %16 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(4) @y)
  %17 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(4) @z)
  %18 = load i32, ptr @x, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = load i32, ptr @y, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %19, i64 %21
  %23 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) @z)
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = load i32, ptr @x, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = load i32, ptr @y, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %26, i64 %28
  store i32 %24, ptr %29, align 4, !tbaa !5
  %30 = add nuw nsw i32 %.02237, 1
  %31 = load i32, ptr @m, align 4, !tbaa !5
  %.not25.not = icmp slt i32 %.02237, %31
  br i1 %.not25.not, label %.lr.ph38, label %.preheader32.loopexit, !llvm.loop !13

.preheader31:                                     ; preds = %.preheader32, %._crit_edge44
  %32 = phi i32 [ %38, %._crit_edge44 ], [ %14, %.preheader32 ]
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %._crit_edge44 ], [ 1, %.preheader32 ]
  %.not2842 = icmp slt i32 %32, 1
  br i1 %.not2842, label %._crit_edge44, label %.preheader30

.preheader:                                       ; preds = %._crit_edge44, %.preheader32
  %33 = load i32, ptr @k, align 4, !tbaa !5
  %34 = add nsw i32 %33, -1
  store i32 %34, ptr @k, align 4, !tbaa !5
  %.not2747 = icmp eq i32 %33, 0
  br i1 %.not2747, label %._crit_edge49, label %.lr.ph48

.preheader30:                                     ; preds = %.preheader31, %._crit_edge
  %35 = phi i32 [ %40, %._crit_edge ], [ %32, %.preheader31 ]
  %36 = phi i32 [ %41, %._crit_edge ], [ %32, %.preheader31 ]
  %indvars.iv56 = phi i64 [ %indvars.iv.next57, %._crit_edge ], [ 1, %.preheader31 ]
  %.not2939 = icmp slt i32 %36, 1
  br i1 %.not2939, label %.preheader30.._crit_edge_crit_edge, label %.lr.ph41

.preheader30.._crit_edge_crit_edge:               ; preds = %.preheader30
  %.pre62 = sext i32 %36 to i64
  br label %._crit_edge

.lr.ph41:                                         ; preds = %.preheader30
  %37 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %indvars.iv56, i64 %indvars.iv59
  br label %42

._crit_edge44:                                    ; preds = %._crit_edge, %.preheader31
  %38 = phi i32 [ %32, %.preheader31 ], [ %40, %._crit_edge ]
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %39 = sext i32 %38 to i64
  %.not26.not = icmp slt i64 %indvars.iv59, %39
  br i1 %.not26.not, label %.preheader31, label %.preheader, !llvm.loop !14

._crit_edge:                                      ; preds = %42, %.preheader30.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre62, %.preheader30.._crit_edge_crit_edge ], [ %51, %42 ]
  %40 = phi i32 [ %35, %.preheader30.._crit_edge_crit_edge ], [ %50, %42 ]
  %41 = phi i32 [ %36, %.preheader30.._crit_edge_crit_edge ], [ %50, %42 ]
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %.not28.not = icmp slt i64 %indvars.iv56, %.pre-phi
  br i1 %.not28.not, label %.preheader30, label %._crit_edge44, !llvm.loop !16

42:                                               ; preds = %.lr.ph41, %42
  %indvars.iv53 = phi i64 [ 1, %.lr.ph41 ], [ %indvars.iv.next54, %42 ]
  %43 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %indvars.iv56, i64 %indvars.iv53
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %44 = load i32, ptr %37, align 4, !tbaa !5
  %45 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %indvars.iv59, i64 %indvars.iv53
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = add nsw i32 %46, %44
  store i32 %47, ptr %1, align 4, !tbaa !5
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %43, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %49 = load i32, ptr %48, align 4, !tbaa !5
  store i32 %49, ptr %43, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  %indvars.iv.next54 = add nuw nsw i64 %indvars.iv53, 1
  %50 = load i32, ptr @n, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %.not29.not = icmp slt i64 %indvars.iv53, %51
  br i1 %.not29.not, label %42, label %._crit_edge, !llvm.loop !17

.lr.ph48:                                         ; preds = %.preheader, %66
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @x)
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %52, ptr noundef nonnull align 4 dereferenceable(4) @y)
  %54 = load i32, ptr @x, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = load i32, ptr @y, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [210 x [210 x i32]], ptr @d, i64 0, i64 %55, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = icmp sgt i32 %59, 530554783
  br i1 %60, label %61, label %63

61:                                               ; preds = %.lr.ph48
  %62 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str)
  br label %66

63:                                               ; preds = %.lr.ph48
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %59)
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %66

66:                                               ; preds = %63, %61
  %67 = load i32, ptr @k, align 4, !tbaa !5
  %68 = add nsw i32 %67, -1
  store i32 %68, ptr @k, align 4, !tbaa !5
  %.not27 = icmp eq i32 %67, 0
  br i1 %.not27, label %._crit_edge49, label %.lr.ph48, !llvm.loop !18

._crit_edge49:                                    ; preds = %66, %.preheader
  ret i32 0
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #5

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint 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 #5 = { nofree nounwind "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 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 #7 = { 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.unroll.disable"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12, !15}
!15 = !{!"llvm.loop.unswitch.partial.disable"}
!16 = distinct !{!16, !12, !15}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass