; LLVM IR from upupming/algorithm :: acwing/算法竞赛进阶指南/0x51-线性DP/275. 传纸条 (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" }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@g = external dso_local global [55 x [55 x i32]], align 16
@f = external dso_local global [110 x [55 x [55 x i32]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_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
  %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
  %17 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %18 = 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)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 4 dereferenceable(4) @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %43, %0
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = load i32, ptr @n, align 4, !tbaa !5
  %23 = icmp sle i32 %21, %22
  br i1 %23, label %25, label %24

24:                                               ; preds = %20
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %46

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

26:                                               ; preds = %39, %25
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = load i32, ptr @m, align 4, !tbaa !5
  %29 = icmp sle i32 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %42

31:                                               ; preds = %26
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [55 x [55 x i32]], ptr @g, i64 0, i64 %33
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [55 x i32], ptr %34, i64 0, i64 %36
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %37)
  br label %39

39:                                               ; preds = %31
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %4, align 4, !tbaa !5
  br label %26, !llvm.loop !9

42:                                               ; preds = %30
  br label %43

43:                                               ; preds = %42
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %2, align 4, !tbaa !5
  br label %20, !llvm.loop !11

46:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 2, ptr %5, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %180, %46
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = load i32, ptr @n, align 4, !tbaa !5
  %50 = load i32, ptr @m, align 4, !tbaa !5
  %51 = add nsw i32 %49, %50
  %52 = icmp sle i32 %48, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %47
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %183

54:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 1, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %55 = load i32, ptr %5, align 4, !tbaa !5
  %56 = load i32, ptr @m, align 4, !tbaa !5
  %57 = sub nsw i32 %55, %56
  store i32 %57, ptr %8, align 4, !tbaa !5
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %59 = load i32, ptr %58, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  store i32 %59, ptr %6, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %176, %54
  %61 = load i32, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = sub nsw i32 %62, 1
  store i32 %63, ptr %9, align 4, !tbaa !5
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = icmp sle i32 %61, %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br i1 %66, label %68, label %67

67:                                               ; preds = %60
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %179

68:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 1, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %69 = load i32, ptr %5, align 4, !tbaa !5
  %70 = load i32, ptr @m, align 4, !tbaa !5
  %71 = sub nsw i32 %69, %70
  store i32 %71, ptr %12, align 4, !tbaa !5
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %73 = load i32, ptr %72, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  store i32 %73, ptr %10, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %172, %68
  %75 = load i32, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %76 = load i32, ptr %5, align 4, !tbaa !5
  %77 = sub nsw i32 %76, 1
  store i32 %77, ptr %13, align 4, !tbaa !5
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = icmp sle i32 %75, %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br i1 %80, label %82, label %81

81:                                               ; preds = %74
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %175

82:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %168, %82
  %84 = load i32, ptr %14, align 4, !tbaa !5
  %85 = icmp sle i32 %84, 1
  br i1 %85, label %87, label %86

86:                                               ; preds = %83
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %171

87:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %164, %87
  %89 = load i32, ptr %15, align 4, !tbaa !5
  %90 = icmp sle i32 %89, 1
  br i1 %90, label %92, label %91

91:                                               ; preds = %88
  store i32 20, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %167

92:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %93 = load i32, ptr %6, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [55 x [55 x i32]], ptr @g, i64 0, i64 %94
  %96 = load i32, ptr %5, align 4, !tbaa !5
  %97 = load i32, ptr %6, align 4, !tbaa !5
  %98 = sub nsw i32 %96, %97
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [55 x i32], ptr %95, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  store i32 %101, ptr %16, align 4, !tbaa !5
  %102 = load i32, ptr %6, align 4, !tbaa !5
  %103 = load i32, ptr %10, align 4, !tbaa !5
  %104 = icmp ne i32 %102, %103
  br i1 %104, label %114, label %105

105:                                              ; preds = %92
  %106 = load i32, ptr %5, align 4, !tbaa !5
  %107 = icmp eq i32 %106, 2
  br i1 %107, label %114, label %108

108:                                              ; preds = %105
  %109 = load i32, ptr %5, align 4, !tbaa !5
  %110 = load i32, ptr @n, align 4, !tbaa !5
  %111 = load i32, ptr @m, align 4, !tbaa !5
  %112 = add nsw i32 %110, %111
  %113 = icmp eq i32 %109, %112
  br i1 %113, label %114, label %163

114:                                              ; preds = %108, %105, %92
  %115 = load i32, ptr %10, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [55 x [55 x i32]], ptr @g, i64 0, i64 %116
  %118 = load i32, ptr %5, align 4, !tbaa !5
  %119 = load i32, ptr %10, align 4, !tbaa !5
  %120 = sub nsw i32 %118, %119
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [55 x i32], ptr %117, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = load i32, ptr %16, align 4, !tbaa !5
  %125 = add nsw i32 %124, %123
  store i32 %125, ptr %16, align 4, !tbaa !5
  %126 = load i32, ptr %5, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [110 x [55 x [55 x i32]]], ptr @f, i64 0, i64 %127
  %129 = load i32, ptr %6, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [55 x [55 x i32]], ptr %128, i64 0, i64 %130
  %132 = load i32, ptr %10, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [55 x i32], ptr %131, i64 0, i64 %133
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %135 = load i32, ptr %5, align 4, !tbaa !5
  %136 = sub nsw i32 %135, 1
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [110 x [55 x [55 x i32]]], ptr @f, i64 0, i64 %137
  %139 = load i32, ptr %6, align 4, !tbaa !5
  %140 = load i32, ptr %14, align 4, !tbaa !5
  %141 = sub nsw i32 %139, %140
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [55 x [55 x i32]], ptr %138, i64 0, i64 %142
  %144 = load i32, ptr %10, align 4, !tbaa !5
  %145 = load i32, ptr %15, align 4, !tbaa !5
  %146 = sub nsw i32 %144, %145
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [55 x i32], ptr %143, i64 0, i64 %147
  %149 = load i32, ptr %148, align 4, !tbaa !5
  %150 = load i32, ptr %16, align 4, !tbaa !5
  %151 = add nsw i32 %149, %150
  store i32 %151, ptr %17, align 4, !tbaa !5
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %134, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = load i32, ptr %5, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [110 x [55 x [55 x i32]]], ptr @f, i64 0, i64 %155
  %157 = load i32, ptr %6, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [55 x [55 x i32]], ptr %156, i64 0, i64 %158
  %160 = load i32, ptr %10, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [55 x i32], ptr %159, i64 0, i64 %161
  store i32 %153, ptr %162, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %163

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

164:                                              ; preds = %163
  %165 = load i32, ptr %15, align 4, !tbaa !5
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %15, align 4, !tbaa !5
  br label %88, !llvm.loop !12

167:                                              ; preds = %91
  br label %168

168:                                              ; preds = %167
  %169 = load i32, ptr %14, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %14, align 4, !tbaa !5
  br label %83, !llvm.loop !13

171:                                              ; preds = %86
  br label %172

172:                                              ; preds = %171
  %173 = load i32, ptr %10, align 4, !tbaa !5
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %10, align 4, !tbaa !5
  br label %74, !llvm.loop !14

175:                                              ; preds = %81
  br label %176

176:                                              ; preds = %175
  %177 = load i32, ptr %6, align 4, !tbaa !5
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %6, align 4, !tbaa !5
  br label %60, !llvm.loop !15

179:                                              ; preds = %67
  br label %180

180:                                              ; preds = %179
  %181 = load i32, ptr %5, align 4, !tbaa !5
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %5, align 4, !tbaa !5
  br label %47, !llvm.loop !16

183:                                              ; preds = %53
  %184 = load i32, ptr @n, align 4, !tbaa !5
  %185 = load i32, ptr @m, align 4, !tbaa !5
  %186 = add nsw i32 %184, %185
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [110 x [55 x [55 x i32]]], ptr @f, i64 0, i64 %187
  %189 = load i32, ptr @n, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [55 x [55 x i32]], ptr %188, i64 0, i64 %190
  %192 = load i32, ptr @n, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [55 x i32], ptr %191, i64 0, i64 %193
  %195 = load i32, ptr %194, align 4, !tbaa !5
  %196 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %195)
  %197 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %196, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #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)) #3

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) #4 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)) #5

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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { 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}
!16 = distinct !{!16, !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" }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@g = external dso_local global [55 x [55 x i32]], align 16
@f = external dso_local global [110 x [55 x [55 x i32]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_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 = 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 = 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)
  %9 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %.not61 = icmp slt i32 %10, 1
  %.pre121 = load i32, ptr @m, align 4, !tbaa !5
  %11 = icmp slt i32 %.pre121, 1
  %or.cond = select i1 %.not61, i1 true, i1 %11
  br i1 %or.cond, label %.preheader56, label %.preheader57

.preheader57:                                     ; preds = %0, %._crit_edge
  %12 = phi i32 [ %17, %._crit_edge ], [ %10, %0 ]
  %13 = phi i32 [ %18, %._crit_edge ], [ %.pre121, %0 ]
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %._crit_edge ], [ 1, %0 ]
  %.not5459 = icmp slt i32 %13, 1
  br i1 %.not5459, label %._crit_edge, label %.lr.ph

.preheader56:                                     ; preds = %._crit_edge, %0
  %14 = phi i32 [ %.pre121, %0 ], [ %18, %._crit_edge ]
  %15 = phi i32 [ %10, %0 ], [ %17, %._crit_edge ]
  %16 = add nsw i32 %14, %15
  %.not5176 = icmp slt i32 %16, 2
  br i1 %.not5176, label %._crit_edge80, label %.lr.ph79

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

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader57
  %17 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %12, %.preheader57 ]
  %18 = phi i32 [ %22, %._crit_edge.loopexit ], [ %13, %.preheader57 ]
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %19 = sext i32 %17 to i64
  %.not.not = icmp slt i64 %indvars.iv88, %19
  br i1 %.not.not, label %.preheader57, label %.preheader56, !llvm.loop !9

.lr.ph:                                           ; preds = %.preheader57, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.preheader57 ]
  %20 = getelementptr inbounds [55 x [55 x i32]], ptr @g, i64 0, i64 %indvars.iv88, i64 %indvars.iv
  %21 = 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) %20)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %22 = load i32, ptr @m, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %.not54.not = icmp slt i64 %indvars.iv, %23
  br i1 %.not54.not, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !12

._crit_edge80:                                    ; preds = %._crit_edge75, %.preheader56
  %.lcssa58 = phi i32 [ %15, %.preheader56 ], [ %96, %._crit_edge75 ]
  %.lcssa = phi i32 [ %16, %.preheader56 ], [ %98, %._crit_edge75 ]
  %24 = sext i32 %.lcssa to i64
  %25 = sext i32 %.lcssa58 to i64
  %26 = getelementptr inbounds [110 x [55 x [55 x i32]]], ptr @f, i64 0, i64 %24, i64 %25, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %27)
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

.lr.ph79:                                         ; preds = %.preheader56, %._crit_edge75
  %30 = phi i32 [ %97, %._crit_edge75 ], [ %14, %.preheader56 ]
  %.04777 = phi i32 [ %95, %._crit_edge75 ], [ 2, %.preheader56 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  store i32 1, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %31 = sub nsw i32 %.04777, %30
  store i32 %31, ptr %2, align 4, !tbaa !5
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %33 = load i32, ptr %32, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %34 = add nsw i32 %.04777, -1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  store i32 %34, ptr %3, align 4, !tbaa !5
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %.not5270 = icmp sgt i32 %33, %36
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  br i1 %.not5270, label %._crit_edge75, label %.lr.ph74

.lr.ph74:                                         ; preds = %.lr.ph79
  %37 = icmp eq i32 %.04777, 2
  %38 = zext nneg i32 %.04777 to i64
  %39 = sext i32 %34 to i64
  br i1 %37, label %.lr.ph74.split.us.preheader, label %.lr.ph74.split.preheader

.lr.ph74.split.preheader:                         ; preds = %.lr.ph74
  %40 = sext i32 %.04777 to i64
  %41 = sext i32 %33 to i64
  br label %.lr.ph74.split

.lr.ph74.split.us.preheader:                      ; preds = %.lr.ph74
  %42 = sext i32 %33 to i64
  br label %.lr.ph74.split.us

.lr.ph74.split.us:                                ; preds = %.lr.ph74.split.us.preheader, %._crit_edge69.split.us.us
  %indvars.iv118 = phi i64 [ %42, %.lr.ph74.split.us.preheader ], [ %indvars.iv.next119, %._crit_edge69.split.us.us ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  store i32 1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %43 = load i32, ptr @m, align 4, !tbaa !5
  %44 = sub nsw i32 2, %43
  store i32 %44, ptr %5, align 4, !tbaa !5
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %46 = load i32, ptr %45, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  store i32 %34, ptr %6, align 4, !tbaa !5
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %.not5367.us = icmp sgt i32 %46, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  br i1 %.not5367.us, label %._crit_edge69.split.us.us, label %.preheader55.lr.ph.us

._crit_edge69.split.us.us:                        ; preds = %.preheader55.us.us, %.lr.ph74.split.us
  %indvars.iv.next119 = add nsw i64 %indvars.iv118, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  store i32 %34, ptr %3, align 4, !tbaa !5
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %.not52.us.not = icmp slt i64 %indvars.iv118, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  br i1 %.not52.us.not, label %.lr.ph74.split.us, label %._crit_edge75, !llvm.loop !13

.preheader55.lr.ph.us:                            ; preds = %.lr.ph74.split.us
  %52 = sub nsw i64 2, %indvars.iv118
  %53 = getelementptr inbounds [55 x [55 x i32]], ptr @g, i64 0, i64 %indvars.iv118, i64 %52
  %54 = sext i32 %46 to i64
  %55 = add nsw i64 %indvars.iv118, -1
  br label %.preheader55.us.us

.preheader55.us.us:                               ; preds = %.preheader55.us.us, %.preheader55.lr.ph.us
  %indvars.iv115 = phi i64 [ %indvars.iv.next116, %.preheader55.us.us ], [ %54, %.preheader55.lr.ph.us ]
  %56 = sub nsw i64 2, %indvars.iv115
  %57 = getelementptr inbounds [55 x [55 x i32]], ptr @g, i64 0, i64 %indvars.iv115, i64 %56
  %58 = getelementptr inbounds [110 x [55 x [55 x i32]]], ptr @f, i64 0, i64 %38, i64 %indvars.iv118, i64 %indvars.iv115
  %59 = load i32, ptr %53, align 4, !tbaa !5
  %60 = load i32, ptr %57, align 4, !tbaa !5
  %61 = add nsw i32 %60, %59
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %62 = getelementptr inbounds [110 x [55 x [55 x i32]]], ptr @f, i64 0, i64 %39, i64 %indvars.iv118, i64 %indvars.iv115
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = add nsw i32 %61, %63
  store i32 %64, ptr %7, align 4, !tbaa !5
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %58, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %66 = load i32, ptr %65, align 4, !tbaa !5
  store i32 %66, ptr %58, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %67 = load i32, ptr %53, align 4, !tbaa !5
  %68 = load i32, ptr %57, align 4, !tbaa !5
  %69 = add nsw i32 %68, %67
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %70 = add nsw i64 %indvars.iv115, -1
  %71 = getelementptr inbounds [110 x [55 x [55 x i32]]], ptr @f, i64 0, i64 %39, i64 %indvars.iv118, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = add nsw i32 %69, %72
  store i32 %73, ptr %7, align 4, !tbaa !5
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %58, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %75 = load i32, ptr %74, align 4, !tbaa !5
  store i32 %75, ptr %58, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %76 = load i32, ptr %53, align 4, !tbaa !5
  %77 = load i32, ptr %57, align 4, !tbaa !5
  %78 = add nsw i32 %77, %76
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %79 = getelementptr inbounds [110 x [55 x [55 x i32]]], ptr @f, i64 0, i64 %39, i64 %55, i64 %indvars.iv115
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = add nsw i32 %78, %80
  store i32 %81, ptr %7, align 4, !tbaa !5
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %58, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %83 = load i32, ptr %82, align 4, !tbaa !5
  store i32 %83, ptr %58, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %84 = load i32, ptr %53, align 4, !tbaa !5
  %85 = load i32, ptr %57, align 4, !tbaa !5
  %86 = add nsw i32 %85, %84
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %87 = getelementptr inbounds [110 x [55 x [55 x i32]]], ptr @f, i64 0, i64 %39, i64 %55, i64 %70
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = add nsw i32 %86, %88
  store i32 %89, ptr %7, align 4, !tbaa !5
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %58, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %91 = load i32, ptr %90, align 4, !tbaa !5
  store i32 %91, ptr %58, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %indvars.iv.next116 = add nsw i64 %indvars.iv115, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  store i32 %34, ptr %6, align 4, !tbaa !5
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %.not53.us.us.not = icmp slt i64 %indvars.iv115, %94
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  br i1 %.not53.us.us.not, label %.preheader55.us.us, label %._crit_edge69.split.us.us, !llvm.loop !14

._crit_edge75:                                    ; preds = %._crit_edge69.split, %._crit_edge69.split.us.us, %.lr.ph79
  %95 = add i32 %.04777, 1
  %96 = load i32, ptr @n, align 4, !tbaa !5
  %97 = load i32, ptr @m, align 4, !tbaa !5
  %98 = add nsw i32 %97, %96
  %.not51 = icmp sgt i32 %95, %98
  br i1 %.not51, label %._crit_edge80, label %.lr.ph79, !llvm.loop !15

.lr.ph74.split:                                   ; preds = %.lr.ph74.split.preheader, %._crit_edge69.split
  %indvars.iv106 = phi i64 [ %41, %.lr.ph74.split.preheader ], [ %indvars.iv.next107, %._crit_edge69.split ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  store i32 1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %99 = load i32, ptr @m, align 4, !tbaa !5
  %100 = sub nsw i32 %.04777, %99
  store i32 %100, ptr %5, align 4, !tbaa !5
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %102 = load i32, ptr %101, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  store i32 %34, ptr %6, align 4, !tbaa !5
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %.not5367 = icmp sgt i32 %102, %104
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  br i1 %.not5367, label %._crit_edge69.split, label %.preheader55.lr.ph

.preheader55.lr.ph:                               ; preds = %.lr.ph74.split
  %105 = sub nsw i64 %40, %indvars.iv106
  %106 = getelementptr inbounds [55 x [55 x i32]], ptr @g, i64 0, i64 %indvars.iv106, i64 %105
  %107 = sext i32 %102 to i64
  %108 = add nsw i64 %indvars.iv106, -1
  %109 = getelementptr inbounds [110 x [55 x [55 x i32]]], ptr @f, i64 0, i64 %39, i64 %indvars.iv106, i64 %indvars.iv106
  %.pre133 = add nsw i64 %indvars.iv106, -1
  %110 = add nsw i64 %indvars.iv106, -1
  %111 = getelementptr inbounds [110 x [55 x [55 x i32]]], ptr @f, i64 0, i64 %39, i64 %indvars.iv106, i64 %110
  br label %.preheader55

.preheader55:                                     ; preds = %.preheader55.lr.ph, %.split66.us
  %indvars.iv103 = phi i64 [ %107, %.preheader55.lr.ph ], [ %indvars.iv.next104, %.split66.us ]
  %112 = icmp eq i64 %indvars.iv103, %indvars.iv106
  %113 = sub nsw i64 %40, %indvars.iv103
  %114 = getelementptr inbounds [55 x [55 x i32]], ptr @g, i64 0, i64 %indvars.iv103, i64 %113
  %115 = getelementptr inbounds [110 x [55 x [55 x i32]]], ptr @f, i64 0, i64 %38, i64 %indvars.iv106, i64 %indvars.iv103
  br i1 %112, label %.preheader.preheader, label %.preheader.us.preheader

.preheader.us.preheader:                          ; preds = %.preheader55
  %116 = load i32, ptr %106, align 4, !tbaa !5
  %117 = load i32, ptr %114, align 4, !tbaa !5
  %118 = add nsw i32 %117, %116
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %119 = getelementptr inbounds [110 x [55 x [55 x i32]]], ptr @f, i64 0, i64 %39, i64 %indvars.iv106, i64 %indvars.iv103
  %120 = load i32, ptr %119, align 4, !tbaa !5
  %121 = add nsw i32 %118, %120
  store i32 %121, ptr %7, align 4, !tbaa !5
  %122 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %115, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %123 = load i32, ptr %122, align 4, !tbaa !5
  store i32 %123, ptr %115, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %124 = load i32, ptr %106, align 4, !tbaa !5
  %125 = load i32, ptr %114, align 4, !tbaa !5
  %126 = add nsw i32 %125, %124
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %127 = add nsw i64 %indvars.iv103, -1
  %128 = getelementptr inbounds [110 x [55 x [55 x i32]]], ptr @f, i64 0, i64 %39, i64 %indvars.iv106, i64 %127
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = add nsw i32 %126, %129
  store i32 %130, ptr %7, align 4, !tbaa !5
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %115, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %132 = load i32, ptr %131, align 4, !tbaa !5
  store i32 %132, ptr %115, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %133 = load i32, ptr %106, align 4, !tbaa !5
  %134 = load i32, ptr %114, align 4, !tbaa !5
  %135 = add nsw i32 %134, %133
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %136 = getelementptr inbounds [110 x [55 x [55 x i32]]], ptr @f, i64 0, i64 %39, i64 %108, i64 %indvars.iv103
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = add nsw i32 %135, %137
  store i32 %138, ptr %7, align 4, !tbaa !5
  %139 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %115, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %140 = load i32, ptr %139, align 4, !tbaa !5
  store i32 %140, ptr %115, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %141 = load i32, ptr %106, align 4, !tbaa !5
  %142 = load i32, ptr %114, align 4, !tbaa !5
  %143 = add nsw i32 %142, %141
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %144 = getelementptr inbounds [110 x [55 x [55 x i32]]], ptr @f, i64 0, i64 %39, i64 %108, i64 %127
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = add nsw i32 %143, %145
  store i32 %146, ptr %7, align 4, !tbaa !5
  %147 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %115, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %148 = load i32, ptr %147, align 4, !tbaa !5
  store i32 %148, ptr %115, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  br label %.split66.us

.preheader.preheader:                             ; preds = %.preheader55
  %149 = load i32, ptr @n, align 4, !tbaa !5
  %150 = load i32, ptr @m, align 4, !tbaa !5
  %151 = add nsw i32 %150, %149
  %152 = icmp eq i32 %.04777, %151
  br i1 %152, label %159, label %167

._crit_edge69.split:                              ; preds = %.split66.us, %.lr.ph74.split
  %indvars.iv.next107 = add nsw i64 %indvars.iv106, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  store i32 %34, ptr %3, align 4, !tbaa !5
  %153 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %154 = load i32, ptr %153, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %.not52.not = icmp slt i64 %indvars.iv106, %155
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  br i1 %.not52.not, label %.lr.ph74.split, label %._crit_edge75, !llvm.loop !13

.split66.us:                                      ; preds = %187, %189, %.preheader.us.preheader
  %indvars.iv.next104 = add nsw i64 %indvars.iv103, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  store i32 %34, ptr %6, align 4, !tbaa !5
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %.not53.not = icmp slt i64 %indvars.iv103, %158
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  br i1 %.not53.not, label %.preheader55, label %._crit_edge69.split, !llvm.loop !14

159:                                              ; preds = %.preheader.preheader
  %160 = load i32, ptr %106, align 4, !tbaa !5
  %161 = load i32, ptr %114, align 4, !tbaa !5
  %162 = add nsw i32 %161, %160
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %163 = load i32, ptr %109, align 4, !tbaa !5
  %164 = add nsw i32 %162, %163
  store i32 %164, ptr %7, align 4, !tbaa !5
  %165 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %115, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %166 = load i32, ptr %165, align 4, !tbaa !5
  store i32 %166, ptr %115, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %.pre122 = load i32, ptr @n, align 4, !tbaa !5
  %.pre123 = load i32, ptr @m, align 4, !tbaa !5
  %.pre128 = add nsw i32 %.pre123, %.pre122
  br label %167

167:                                              ; preds = %159, %.preheader.preheader
  %.pre-phi = phi i32 [ %.pre128, %159 ], [ %151, %.preheader.preheader ]
  %168 = icmp eq i32 %.04777, %.pre-phi
  br i1 %168, label %169, label %.split

169:                                              ; preds = %167
  %170 = load i32, ptr %106, align 4, !tbaa !5
  %171 = load i32, ptr %114, align 4, !tbaa !5
  %172 = add nsw i32 %171, %170
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %173 = load i32, ptr %111, align 4, !tbaa !5
  %174 = add nsw i32 %172, %173
  store i32 %174, ptr %7, align 4, !tbaa !5
  %175 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %115, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %176 = load i32, ptr %175, align 4, !tbaa !5
  store i32 %176, ptr %115, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %.pre124 = load i32, ptr @n, align 4, !tbaa !5
  %.pre125 = load i32, ptr @m, align 4, !tbaa !5
  %.pre129 = add nsw i32 %.pre125, %.pre124
  br label %.split

.split:                                           ; preds = %167, %169
  %.pre-phi134 = phi i64 [ %110, %169 ], [ %.pre133, %167 ]
  %.pre-phi130 = phi i32 [ %.pre129, %169 ], [ %.pre-phi, %167 ]
  %177 = icmp eq i32 %.04777, %.pre-phi130
  br i1 %177, label %178, label %187

178:                                              ; preds = %.split
  %179 = load i32, ptr %106, align 4, !tbaa !5
  %180 = load i32, ptr %114, align 4, !tbaa !5
  %181 = add nsw i32 %180, %179
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %182 = getelementptr inbounds [110 x [55 x [55 x i32]]], ptr @f, i64 0, i64 %39, i64 %.pre-phi134, i64 %indvars.iv106
  %183 = load i32, ptr %182, align 4, !tbaa !5
  %184 = add nsw i32 %181, %183
  store i32 %184, ptr %7, align 4, !tbaa !5
  %185 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %115, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %186 = load i32, ptr %185, align 4, !tbaa !5
  store i32 %186, ptr %115, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %.pre126 = load i32, ptr @n, align 4, !tbaa !5
  %.pre127 = load i32, ptr @m, align 4, !tbaa !5
  %.pre131 = add nsw i32 %.pre127, %.pre126
  br label %187

187:                                              ; preds = %178, %.split
  %.pre-phi132 = phi i32 [ %.pre131, %178 ], [ %.pre-phi130, %.split ]
  %188 = icmp eq i32 %.04777, %.pre-phi132
  br i1 %188, label %189, label %.split66.us

189:                                              ; preds = %187
  %190 = load i32, ptr %106, align 4, !tbaa !5
  %191 = load i32, ptr %114, align 4, !tbaa !5
  %192 = add nsw i32 %191, %190
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %193 = getelementptr inbounds [110 x [55 x [55 x i32]]], ptr @f, i64 0, i64 %39, i64 %.pre-phi134, i64 %.pre-phi134
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = add nsw i32 %192, %194
  store i32 %195, ptr %7, align 4, !tbaa !5
  %196 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %115, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %197 = load i32, ptr %196, align 4, !tbaa !5
  store i32 %197, ptr %115, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  br label %.split66.us
}

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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #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 #3

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 #4 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)) #5

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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { 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, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.unswitch.partial.disable"}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}


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