; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/155 Division 2/Problem B (B)

; 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_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"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::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }

@fin = external dso_local global %"class.std::basic_ifstream", align 8
@fout = external dso_local global %"class.std::basic_ofstream", align 8
@n = external dso_local global i32, align 4
@days = external dso_local global [12 x i32], align 16
@v = external dso_local global [30 x [32 x i32]], align 16
@m = external dso_local global i32, align 4
@d = external dso_local global i32, align 4
@p = external dso_local global i32, align 4
@t = external dso_local global i32, align 4
@mx = external dso_local global i32, align 4

; 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
  store i32 0, ptr %1, align 4
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @fin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %8

8:                                                ; preds = %54, %0
  %9 = load i32, ptr %2, align 4, !tbaa !5
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %11 = icmp slt i32 %9, %10
  br i1 %11, label %13, label %12

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

13:                                               ; preds = %8
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @fin, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) @d)
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(4) @p)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(4) @t)
  %18 = load i32, ptr @m, align 4, !tbaa !5
  %19 = add nsw i32 %18, -1
  store i32 %19, ptr @m, align 4, !tbaa !5
  %20 = load i32, ptr @m, align 4, !tbaa !5
  %21 = add nsw i32 %20, 12
  store i32 %21, ptr @m, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %50, %13
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = load i32, ptr @t, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %27, label %26

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

27:                                               ; preds = %22
  %28 = load i32, ptr @d, align 4, !tbaa !5
  %29 = add nsw i32 %28, -1
  store i32 %29, ptr @d, align 4, !tbaa !5
  %30 = load i32, ptr @d, align 4, !tbaa !5
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %40

32:                                               ; preds = %27
  %33 = load i32, ptr @m, align 4, !tbaa !5
  %34 = add nsw i32 %33, -1
  store i32 %34, ptr @m, align 4, !tbaa !5
  %35 = load i32, ptr @m, align 4, !tbaa !5
  %36 = srem i32 %35, 12
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [12 x i32], ptr @days, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !5
  store i32 %39, ptr @d, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %32, %27
  %41 = load i32, ptr @p, align 4, !tbaa !5
  %42 = load i32, ptr @m, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %43
  %45 = load i32, ptr @d, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [32 x i32], ptr %44, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = add nsw i32 %48, %41
  store i32 %49, ptr %47, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %40
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %4, align 4, !tbaa !5
  br label %22, !llvm.loop !9

53:                                               ; preds = %26
  br label %54

54:                                               ; preds = %53
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %2, align 4, !tbaa !5
  br label %8, !llvm.loop !11

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

58:                                               ; preds = %80, %57
  %59 = load i32, ptr %5, align 4, !tbaa !5
  %60 = icmp slt i32 %59, 30
  br i1 %60, label %62, label %61

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

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

63:                                               ; preds = %76, %62
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = icmp slt i32 %64, 32
  br i1 %65, label %67, label %66

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

67:                                               ; preds = %63
  %68 = load i32, ptr %5, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %69
  %71 = load i32, ptr %6, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [32 x i32], ptr %70, i64 0, i64 %72
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %73)
  %75 = load i32, ptr %74, align 4, !tbaa !5
  store i32 %75, ptr @mx, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %67
  %77 = load i32, ptr %6, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %6, align 4, !tbaa !5
  br label %63, !llvm.loop !12

79:                                               ; preds = %66
  br label %80

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

83:                                               ; preds = %61
  %84 = load i32, ptr @mx, align 4, !tbaa !5
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @fout, i32 noundef %84)
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %85, 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

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}


; 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_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"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::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }

@fin = external dso_local global %"class.std::basic_ifstream", align 8
@fout = external dso_local global %"class.std::basic_ofstream", align 8
@n = external dso_local global i32, align 4
@days = external dso_local local_unnamed_addr global [12 x i32], align 16
@v = external dso_local global [30 x [32 x i32]], align 16
@m = external dso_local global i32, align 4
@d = external dso_local global i32, align 4
@p = external dso_local global i32, align 4
@t = external dso_local global i32, align 4
@mx = external dso_local global i32, align 4

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @fin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %2 = load i32, ptr @n, align 4, !tbaa !5
  %3 = icmp sgt i32 %2, 0
  br i1 %3, label %.lr.ph17, label %.preheader.preheader

.preheader.preheader:                             ; preds = %13, %0
  br label %.preheader

.lr.ph17:                                         ; preds = %0, %13
  %.01215 = phi i32 [ %14, %13 ], [ 0, %0 ]
  %4 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @fin, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %5 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 4 dereferenceable(4) @d)
  %6 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(4) @p)
  %7 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(4) @t)
  %8 = load i32, ptr @m, align 4, !tbaa !5
  %9 = add nsw i32 %8, 11
  store i32 %9, ptr @m, align 4, !tbaa !5
  %10 = load i32, ptr @t, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %13

.lr.ph:                                           ; preds = %.lr.ph17
  %d.promoted = load i32, ptr @d, align 4, !tbaa !5
  %12 = load i32, ptr @p, align 4, !tbaa !5
  br label %17

._crit_edge:                                      ; preds = %28
  store i32 %30, ptr @d, align 4, !tbaa !5
  br label %13

13:                                               ; preds = %._crit_edge, %.lr.ph17
  %14 = add nuw nsw i32 %.01215, 1
  %15 = load i32, ptr @n, align 4, !tbaa !5
  %16 = icmp slt i32 %14, %15
  br i1 %16, label %.lr.ph17, label %.preheader.preheader, !llvm.loop !9

17:                                               ; preds = %.lr.ph, %28
  %.01114 = phi i32 [ 0, %.lr.ph ], [ %36, %28 ]
  %18 = phi i32 [ %d.promoted, %.lr.ph ], [ %30, %28 ]
  %19 = phi i32 [ %9, %.lr.ph ], [ %29, %28 ]
  %20 = add nsw i32 %18, -1
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %22, label %28

22:                                               ; preds = %17
  %23 = add nsw i32 %19, -1
  store i32 %23, ptr @m, align 4, !tbaa !5
  %24 = srem i32 %23, 12
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [12 x i32], ptr @days, i64 0, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %22, %17
  %29 = phi i32 [ %23, %22 ], [ %19, %17 ]
  %30 = phi i32 [ %27, %22 ], [ %20, %17 ]
  %31 = sext i32 %29 to i64
  %32 = sext i32 %30 to i64
  %33 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %31, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = add nsw i32 %34, %12
  store i32 %35, ptr %33, align 4, !tbaa !5
  %36 = add nuw nsw i32 %.01114, 1
  %exitcond.not = icmp eq i32 %36, %10
  br i1 %exitcond.not, label %._crit_edge, label %17, !llvm.loop !11

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader ], [ 0, %.preheader.preheader ]
  %37 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 0
  %38 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %37)
  %39 = load i32, ptr %38, align 4, !tbaa !5
  store i32 %39, ptr @mx, align 4, !tbaa !5
  %40 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 1
  %41 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %40)
  %42 = load i32, ptr %41, align 4, !tbaa !5
  store i32 %42, ptr @mx, align 4, !tbaa !5
  %43 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 2
  %44 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %43)
  %45 = load i32, ptr %44, align 4, !tbaa !5
  store i32 %45, ptr @mx, align 4, !tbaa !5
  %46 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 3
  %47 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %46)
  %48 = load i32, ptr %47, align 4, !tbaa !5
  store i32 %48, ptr @mx, align 4, !tbaa !5
  %49 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 4
  %50 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %49)
  %51 = load i32, ptr %50, align 4, !tbaa !5
  store i32 %51, ptr @mx, align 4, !tbaa !5
  %52 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 5
  %53 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %52)
  %54 = load i32, ptr %53, align 4, !tbaa !5
  store i32 %54, ptr @mx, align 4, !tbaa !5
  %55 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 6
  %56 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %55)
  %57 = load i32, ptr %56, align 4, !tbaa !5
  store i32 %57, ptr @mx, align 4, !tbaa !5
  %58 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 7
  %59 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %58)
  %60 = load i32, ptr %59, align 4, !tbaa !5
  store i32 %60, ptr @mx, align 4, !tbaa !5
  %61 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 8
  %62 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %61)
  %63 = load i32, ptr %62, align 4, !tbaa !5
  store i32 %63, ptr @mx, align 4, !tbaa !5
  %64 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 9
  %65 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %64)
  %66 = load i32, ptr %65, align 4, !tbaa !5
  store i32 %66, ptr @mx, align 4, !tbaa !5
  %67 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 10
  %68 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %67)
  %69 = load i32, ptr %68, align 4, !tbaa !5
  store i32 %69, ptr @mx, align 4, !tbaa !5
  %70 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 11
  %71 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %70)
  %72 = load i32, ptr %71, align 4, !tbaa !5
  store i32 %72, ptr @mx, align 4, !tbaa !5
  %73 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 12
  %74 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %73)
  %75 = load i32, ptr %74, align 4, !tbaa !5
  store i32 %75, ptr @mx, align 4, !tbaa !5
  %76 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 13
  %77 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %76)
  %78 = load i32, ptr %77, align 4, !tbaa !5
  store i32 %78, ptr @mx, align 4, !tbaa !5
  %79 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 14
  %80 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %79)
  %81 = load i32, ptr %80, align 4, !tbaa !5
  store i32 %81, ptr @mx, align 4, !tbaa !5
  %82 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 15
  %83 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %82)
  %84 = load i32, ptr %83, align 4, !tbaa !5
  store i32 %84, ptr @mx, align 4, !tbaa !5
  %85 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 16
  %86 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %85)
  %87 = load i32, ptr %86, align 4, !tbaa !5
  store i32 %87, ptr @mx, align 4, !tbaa !5
  %88 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 17
  %89 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %88)
  %90 = load i32, ptr %89, align 4, !tbaa !5
  store i32 %90, ptr @mx, align 4, !tbaa !5
  %91 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 18
  %92 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %91)
  %93 = load i32, ptr %92, align 4, !tbaa !5
  store i32 %93, ptr @mx, align 4, !tbaa !5
  %94 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 19
  %95 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %94)
  %96 = load i32, ptr %95, align 4, !tbaa !5
  store i32 %96, ptr @mx, align 4, !tbaa !5
  %97 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 20
  %98 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %97)
  %99 = load i32, ptr %98, align 4, !tbaa !5
  store i32 %99, ptr @mx, align 4, !tbaa !5
  %100 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 21
  %101 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %100)
  %102 = load i32, ptr %101, align 4, !tbaa !5
  store i32 %102, ptr @mx, align 4, !tbaa !5
  %103 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 22
  %104 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %103)
  %105 = load i32, ptr %104, align 4, !tbaa !5
  store i32 %105, ptr @mx, align 4, !tbaa !5
  %106 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 23
  %107 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %106)
  %108 = load i32, ptr %107, align 4, !tbaa !5
  store i32 %108, ptr @mx, align 4, !tbaa !5
  %109 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 24
  %110 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %109)
  %111 = load i32, ptr %110, align 4, !tbaa !5
  store i32 %111, ptr @mx, align 4, !tbaa !5
  %112 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 25
  %113 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %112)
  %114 = load i32, ptr %113, align 4, !tbaa !5
  store i32 %114, ptr @mx, align 4, !tbaa !5
  %115 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 26
  %116 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %115)
  %117 = load i32, ptr %116, align 4, !tbaa !5
  store i32 %117, ptr @mx, align 4, !tbaa !5
  %118 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 27
  %119 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %118)
  %120 = load i32, ptr %119, align 4, !tbaa !5
  store i32 %120, ptr @mx, align 4, !tbaa !5
  %121 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 28
  %122 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %121)
  %123 = load i32, ptr %122, align 4, !tbaa !5
  store i32 %123, ptr @mx, align 4, !tbaa !5
  %124 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 29
  %125 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %124)
  %126 = load i32, ptr %125, align 4, !tbaa !5
  store i32 %126, ptr @mx, align 4, !tbaa !5
  %127 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 30
  %128 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %127)
  %129 = load i32, ptr %128, align 4, !tbaa !5
  store i32 %129, ptr @mx, align 4, !tbaa !5
  %130 = getelementptr inbounds [30 x [32 x i32]], ptr @v, i64 0, i64 %indvars.iv, i64 31
  %131 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %130)
  %132 = load i32, ptr %131, align 4, !tbaa !5
  store i32 %132, ptr @mx, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond23.not = icmp eq i64 %indvars.iv.next, 30
  br i1 %exitcond23.not, label %133, label %.preheader, !llvm.loop !12

133:                                              ; preds = %.preheader
  %134 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @fout, i32 noundef %132)
  %135 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %134, ptr noundef nonnull @_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)) local_unnamed_addr #1

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

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

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 = { 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 #3 = { 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 #4 = { 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" }

!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}


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