; LLVM IR from Izaron/ACM-ICPC :: Timus Online Judge/Volume 10/1944. Record of the Attack at the Orbit (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" }

@m = external dso_local global [1000 x [1000 x i8]], align 16
@xMin = external dso_local global i32, align 4
@xMax = external dso_local global i32, align 4
@yMin = external dso_local global i32, align 4
@yMax = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z9setXYSudoiic(i32 noundef, i32 noundef, i8 noundef signext) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5setXYiic(i32 noundef, i32 noundef, i8 noundef signext) #1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %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
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %37, %0
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = icmp slt i32 %18, 1000
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %33, %21
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = icmp slt i32 %23, 1000
  br i1 %24, label %26, label %25

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

26:                                               ; preds = %22
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [1000 x [1000 x i8]], ptr @m, i64 0, i64 %28
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [1000 x i8], ptr %29, i64 0, i64 %31
  store i8 46, ptr %32, align 1, !tbaa !9
  br label %33

33:                                               ; preds = %26
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %4, align 4, !tbaa !5
  br label %22, !llvm.loop !10

36:                                               ; preds = %25
  br label %37

37:                                               ; preds = %36
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %2, align 4, !tbaa !5
  br label %17, !llvm.loop !12

40:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %59, %40
  %42 = load i32, ptr %5, align 4, !tbaa !5
  %43 = icmp slt i32 %42, 850
  br i1 %43, label %45, label %44

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

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

46:                                               ; preds = %55, %45
  %47 = load i32, ptr %6, align 4, !tbaa !5
  %48 = icmp slt i32 %47, 850
  br i1 %48, label %50, label %49

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

50:                                               ; preds = %46
  %51 = load i32, ptr %6, align 4, !tbaa !5
  %52 = sub nsw i32 %51, 300
  call void @_Z9setXYSudoiic(i32 noundef 0, i32 noundef %52, i8 noundef signext 124)
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = sub nsw i32 %53, 300
  call void @_Z9setXYSudoiic(i32 noundef %54, i32 noundef 0, i8 noundef signext 45)
  br label %55

55:                                               ; preds = %50
  %56 = load i32, ptr %6, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %6, align 4, !tbaa !5
  br label %46, !llvm.loop !13

58:                                               ; preds = %49
  br label %59

59:                                               ; preds = %58
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %5, align 4, !tbaa !5
  br label %41, !llvm.loop !14

62:                                               ; preds = %44
  call void @_Z9setXYSudoiic(i32 noundef 0, i32 noundef 0, i8 noundef signext 43)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %63 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %74, %62
  %65 = load i32, ptr %8, align 4, !tbaa !5
  %66 = load i32, ptr %7, align 4, !tbaa !5
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %64
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %77

69:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %70 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %71 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %70, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %72 = load i32, ptr %9, align 4, !tbaa !5
  %73 = load i32, ptr %10, align 4, !tbaa !5
  call void @_Z5setXYiic(i32 noundef %72, i32 noundef %73, i8 noundef signext 42)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %74

74:                                               ; preds = %69
  %75 = load i32, ptr %8, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %8, align 4, !tbaa !5
  br label %64, !llvm.loop !15

77:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 400, ptr %11, align 4, !tbaa !5
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @xMin, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %79 = load i32, ptr %78, align 4, !tbaa !5
  store i32 %79, ptr @xMin, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 400, ptr %12, align 4, !tbaa !5
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @xMax, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %81 = load i32, ptr %80, align 4, !tbaa !5
  store i32 %81, ptr @xMax, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 400, ptr %13, align 4, !tbaa !5
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @yMin, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %83 = load i32, ptr %82, align 4, !tbaa !5
  store i32 %83, ptr @yMin, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 400, ptr %14, align 4, !tbaa !5
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @yMax, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %85 = load i32, ptr %84, align 4, !tbaa !5
  store i32 %85, ptr @yMax, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %86 = load i32, ptr @yMin, align 4, !tbaa !5
  store i32 %86, ptr %15, align 4, !tbaa !5
  br label %87

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

91:                                               ; preds = %87
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %120

92:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %93 = load i32, ptr @xMin, align 4, !tbaa !5
  store i32 %93, ptr %16, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %112, %92
  %95 = load i32, ptr %16, align 4, !tbaa !5
  %96 = load i32, ptr @xMax, align 4, !tbaa !5
  %97 = icmp sle i32 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  store i32 20, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %115

99:                                               ; preds = %94
  %100 = load i32, ptr %16, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [1000 x [1000 x i8]], ptr @m, i64 0, i64 %101
  %103 = load i32, ptr @yMax, align 4, !tbaa !5
  %104 = load i32, ptr %15, align 4, !tbaa !5
  %105 = sub nsw i32 %103, %104
  %106 = load i32, ptr @yMin, align 4, !tbaa !5
  %107 = add nsw i32 %105, %106
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [1000 x i8], ptr %102, i64 0, i64 %108
  %110 = load i8, ptr %109, align 1, !tbaa !9
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %110)
  br label %112

112:                                              ; preds = %99
  %113 = load i32, ptr %16, align 4, !tbaa !5
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %16, align 4, !tbaa !5
  br label %94, !llvm.loop !16

115:                                              ; preds = %98
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %117

117:                                              ; preds = %115
  %118 = load i32, ptr %15, align 4, !tbaa !5
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %15, align 4, !tbaa !5
  br label %87, !llvm.loop !17

120:                                              ; preds = %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  %121 = load i32, ptr %1, align 4
  ret i32 %121
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1 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 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 #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress 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 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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { "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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}


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

@m = external dso_local local_unnamed_addr global [1000 x [1000 x i8]], align 16
@xMin = external dso_local global i32, align 4
@xMax = external dso_local global i32, align 4
@yMin = external dso_local global i32, align 4
@yMax = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z9setXYSudoiic(i32 noundef, i32 noundef, i8 noundef signext) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5setXYiic(i32 noundef, i32 noundef, i8 noundef signext) local_unnamed_addr #1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
.preheader.preheader:
  %0 = alloca i32, align 4
  %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
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1000000) @m, i8 46, i64 1000000, i1 false), !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %12
  %.02433 = phi i32 [ %13, %12 ], [ 0, %.preheader.preheader ]
  %7 = add nsw i32 %.02433, -300
  br label %14

8:                                                ; preds = %12
  tail call void @_Z9setXYSudoiic(i32 noundef 0, i32 noundef 0, i8 noundef signext 43)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %0) #8
  %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) %0)
  %10 = load i32, ptr %0, align 4, !tbaa !8
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge

12:                                               ; preds = %14
  %13 = add nuw nsw i32 %.02433, 1
  %exitcond47.not = icmp eq i32 %13, 850
  br i1 %exitcond47.not, label %8, label %.preheader, !llvm.loop !10

14:                                               ; preds = %.preheader, %14
  %.02332 = phi i32 [ 0, %.preheader ], [ %16, %14 ]
  %15 = add nsw i32 %.02332, -300
  tail call void @_Z9setXYSudoiic(i32 noundef 0, i32 noundef %15, i8 noundef signext 124)
  tail call void @_Z9setXYSudoiic(i32 noundef %7, i32 noundef 0, i8 noundef signext 45)
  %16 = add nuw nsw i32 %.02332, 1
  %exitcond.not = icmp eq i32 %16, 850
  br i1 %exitcond.not, label %12, label %14, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph, %8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 400, ptr %3, align 4, !tbaa !8
  %17 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @xMin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %18 = load i32, ptr %17, align 4, !tbaa !8
  store i32 %18, ptr @xMin, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 400, ptr %4, align 4, !tbaa !8
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @xMax, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %20 = load i32, ptr %19, align 4, !tbaa !8
  store i32 %20, ptr @xMax, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  store i32 400, ptr %5, align 4, !tbaa !8
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @yMin, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %22 = load i32, ptr %21, align 4, !tbaa !8
  store i32 %22, ptr @yMin, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  store i32 400, ptr %6, align 4, !tbaa !8
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @yMax, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %24 = load i32, ptr %23, align 4, !tbaa !8
  store i32 %24, ptr @yMax, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  %25 = load i32, ptr @yMin, align 4, !tbaa !8
  %.not40 = icmp sgt i32 %25, %24
  br i1 %.not40, label %._crit_edge44, label %.lr.ph43

.lr.ph:                                           ; preds = %8, %.lr.ph
  %.02234 = phi i32 [ %30, %.lr.ph ], [ 0, %8 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %28 = load i32, ptr %1, align 4, !tbaa !8
  %29 = load i32, ptr %2, align 4, !tbaa !8
  call void @_Z5setXYiic(i32 noundef %28, i32 noundef %29, i8 noundef signext 42)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  %30 = add nuw nsw i32 %.02234, 1
  %31 = load i32, ptr %0, align 4, !tbaa !8
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge44:                                    ; preds = %._crit_edge39, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %0) #8
  ret i32 0

.lr.ph43:                                         ; preds = %._crit_edge, %._crit_edge39
  %.02141 = phi i32 [ %37, %._crit_edge39 ], [ %25, %._crit_edge ]
  %33 = load i32, ptr @xMin, align 4, !tbaa !8
  %34 = load i32, ptr @xMax, align 4, !tbaa !8
  %.not2735 = icmp sgt i32 %33, %34
  br i1 %.not2735, label %._crit_edge39, label %.lr.ph38

.lr.ph38:                                         ; preds = %.lr.ph43
  %35 = sext i32 %33 to i64
  br label %39

._crit_edge39:                                    ; preds = %39, %.lr.ph43
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %37 = add nsw i32 %.02141, 1
  %38 = load i32, ptr @yMax, align 4, !tbaa !8
  %.not.not = icmp slt i32 %.02141, %38
  br i1 %.not.not, label %.lr.ph43, label %._crit_edge44, !llvm.loop !14

39:                                               ; preds = %.lr.ph38, %39
  %indvars.iv = phi i64 [ %35, %.lr.ph38 ], [ %indvars.iv.next, %39 ]
  %40 = load i32, ptr @yMax, align 4, !tbaa !8
  %41 = sub i32 %40, %.02141
  %42 = load i32, ptr @yMin, align 4, !tbaa !8
  %43 = add nsw i32 %41, %42
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [1000 x [1000 x i8]], ptr @m, i64 0, i64 %indvars.iv, i64 %44
  %46 = load i8, ptr %45, align 1, !tbaa !5
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %46)
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %48 = load i32, ptr @xMax, align 4, !tbaa !8
  %49 = sext i32 %48 to i64
  %.not27.not = icmp slt i64 %indvars.iv, %49
  br i1 %.not27.not, label %39, label %._crit_edge39, !llvm.loop !15
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #6

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

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

attributes #0 = { 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 #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress 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 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 #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}


; Effective O3 passes: GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass