; LLVM IR from DionysiosB/CodeForces :: 0001-0099 (35C-FireAgain)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z4mabsi(i32 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca %"class.std::allocator", align 1
  %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
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %21 = load ptr, ptr @stdin, align 8, !tbaa !5
  %22 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %21)
  %23 = load ptr, ptr @stdout, align 8, !tbaa !5
  %24 = call ptr @freopen(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %23)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.5, ptr noundef %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  %27 = load i32, ptr %4, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %28, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %29 unwind label %38

29:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #5
  %30 = load i32, ptr %4, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %31, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %32 unwind label %42

32:                                               ; preds = %29
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %55, %32
  %34 = load i32, ptr %11, align 4, !tbaa !9
  %35 = load i32, ptr %4, align 4, !tbaa !9
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %46, label %37

37:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %62

38:                                               ; preds = %0
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %7, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  br label %136

42:                                               ; preds = %29
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %7, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  br label %135

46:                                               ; preds = %33
  %47 = load i32, ptr %11, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %48) #5
  %50 = load i32, ptr %11, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %51) #5
  %53 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef %49, ptr noundef %52)
          to label %54 unwind label %58

54:                                               ; preds = %46
  br label %55

55:                                               ; preds = %54
  %56 = load i32, ptr %11, align 4, !tbaa !9
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %11, align 4, !tbaa !9
  br label %33, !llvm.loop !11

58:                                               ; preds = %46
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %7, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %134

62:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 -1, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 -1, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 -1, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 1, ptr %15, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %121, %62
  %64 = load i32, ptr %15, align 4, !tbaa !9
  %65 = load i32, ptr %2, align 4, !tbaa !9
  %66 = icmp sle i32 %64, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %63
  store i32 5, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %124

68:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %117, %68
  %70 = load i32, ptr %17, align 4, !tbaa !9
  %71 = load i32, ptr %3, align 4, !tbaa !9
  %72 = icmp sle i32 %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  store i32 8, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %120

74:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 2000000000, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %105, %74
  %76 = load i32, ptr %19, align 4, !tbaa !9
  %77 = load i32, ptr %4, align 4, !tbaa !9
  %78 = icmp slt i32 %76, %77
  br i1 %78, label %80, label %79

79:                                               ; preds = %75
  store i32 11, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %108

80:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %81 = load i32, ptr %15, align 4, !tbaa !9
  %82 = load i32, ptr %19, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %83) #5
  %85 = load i32, ptr %84, align 4, !tbaa !9
  %86 = sub nsw i32 %81, %85
  %87 = call noundef i32 @_Z4mabsi(i32 noundef %86)
  %88 = load i32, ptr %17, align 4, !tbaa !9
  %89 = load i32, ptr %19, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %90) #5
  %92 = load i32, ptr %91, align 4, !tbaa !9
  %93 = sub nsw i32 %88, %92
  %94 = call noundef i32 @_Z4mabsi(i32 noundef %93)
  %95 = add nsw i32 %87, %94
  store i32 %95, ptr %20, align 4, !tbaa !9
  %96 = load i32, ptr %20, align 4, !tbaa !9
  %97 = load i32, ptr %18, align 4, !tbaa !9
  %98 = icmp slt i32 %96, %97
  br i1 %98, label %99, label %101

99:                                               ; preds = %80
  %100 = load i32, ptr %20, align 4, !tbaa !9
  br label %103

101:                                              ; preds = %80
  %102 = load i32, ptr %18, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %101, %99
  %104 = phi i32 [ %100, %99 ], [ %102, %101 ]
  store i32 %104, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %105

105:                                              ; preds = %103
  %106 = load i32, ptr %19, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %19, align 4, !tbaa !9
  br label %75, !llvm.loop !13

108:                                              ; preds = %79
  %109 = load i32, ptr %18, align 4, !tbaa !9
  %110 = load i32, ptr %14, align 4, !tbaa !9
  %111 = icmp sgt i32 %109, %110
  br i1 %111, label %112, label %116

112:                                              ; preds = %108
  %113 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %113, ptr %14, align 4, !tbaa !9
  %114 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %114, ptr %12, align 4, !tbaa !9
  %115 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %115, ptr %13, align 4, !tbaa !9
  br label %116

116:                                              ; preds = %112, %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %17, align 4, !tbaa !9
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %17, align 4, !tbaa !9
  br label %69, !llvm.loop !14

120:                                              ; preds = %73
  br label %121

121:                                              ; preds = %120
  %122 = load i32, ptr %15, align 4, !tbaa !9
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %15, align 4, !tbaa !9
  br label %63, !llvm.loop !15

124:                                              ; preds = %67
  %125 = load i32, ptr %12, align 4, !tbaa !9
  %126 = load i32, ptr %13, align 4, !tbaa !9
  %127 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %125, i32 noundef %126)
          to label %128 unwind label %130

128:                                              ; preds = %124
  store i32 0, ptr %1, align 4
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %129 = load i32, ptr %1, align 4
  ret i32 %129

130:                                              ; preds = %124
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %7, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %134

134:                                              ; preds = %130, %58
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  br label %135

135:                                              ; preds = %134, %42
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %136

136:                                              ; preds = %135, %38
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %137

137:                                              ; preds = %136
  %138 = load ptr, ptr %7, align 8
  %139 = load i32, ptr %8, align 4
  %140 = insertvalue { ptr, i32 } poison, ptr %138, 0
  %141 = insertvalue { ptr, i32 } %140, i32 %139, 1
  resume { ptr, i32 } %141
}

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #2

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z4mabsi(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = load ptr, ptr @stdin, align 8, !tbaa !5
  %9 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %8)
  %10 = load ptr, ptr @stdout, align 8, !tbaa !5
  %11 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %10)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %1, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  %14 = load i32, ptr %3, align 4, !tbaa !9
  %15 = sext i32 %14 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %15, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %16 unwind label %26

16:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #7
  %17 = load i32, ptr %3, align 4, !tbaa !9
  %18 = sext i32 %17 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %18, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %19 unwind label %28

19:                                               ; preds = %16
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  %20 = load i32, ptr %3, align 4, !tbaa !9
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph, label %.preheader43

.preheader43:                                     ; preds = %.lr.ph, %19
  %22 = phi i32 [ %20, %19 ], [ %33, %.lr.ph ]
  %23 = load i32, ptr %1, align 4, !tbaa !9
  %.not59 = icmp slt i32 %23, 1
  %24 = load i32, ptr %2, align 4
  %25 = icmp slt i32 %24, 1
  %or.cond = select i1 %.not59, i1 true, i1 %25
  br i1 %or.cond, label %._crit_edge65, label %.preheader42

26:                                               ; preds = %0
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  br label %73

28:                                               ; preds = %16
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  br label %73

.lr.ph:                                           ; preds = %19, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %19 ]
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv) #7
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #7
  %32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %30, ptr noundef nonnull %31)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %33 = load i32, ptr %3, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = icmp slt i64 %indvars.iv.next, %34
  br i1 %35, label %.lr.ph, label %.preheader43, !llvm.loop !11

.preheader42:                                     ; preds = %.preheader43, %._crit_edge53
  %36 = phi i32 [ %49, %._crit_edge53 ], [ %23, %.preheader43 ]
  %37 = phi i32 [ %50, %._crit_edge53 ], [ %24, %.preheader43 ]
  %38 = phi i32 [ %51, %._crit_edge53 ], [ %22, %.preheader43 ]
  %39 = phi i32 [ %52, %._crit_edge53 ], [ %24, %.preheader43 ]
  %40 = phi i32 [ %53, %._crit_edge53 ], [ %22, %.preheader43 ]
  %41 = phi i32 [ %54, %._crit_edge53 ], [ %24, %.preheader43 ]
  %.02963 = phi i32 [ %55, %._crit_edge53 ], [ 1, %.preheader43 ]
  %.03062 = phi i32 [ %.1.lcssa, %._crit_edge53 ], [ -1, %.preheader43 ]
  %.03161 = phi i32 [ %.132.lcssa, %._crit_edge53 ], [ -1, %.preheader43 ]
  %.03460 = phi i32 [ %.135.lcssa, %._crit_edge53 ], [ -1, %.preheader43 ]
  %.not4148 = icmp slt i32 %41, 1
  br i1 %.not4148, label %._crit_edge53, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.preheader42
  %42 = icmp sgt i32 %40, 0
  br i1 %42, label %.preheader, label %.preheader.lr.ph.split.us

.preheader.lr.ph.split.us:                        ; preds = %.preheader.lr.ph
  %smax = call i32 @llvm.smax.i32(i32 %39, i32 1)
  %43 = icmp slt i32 %.03062, 2000000000
  %.236.us.peel = select i1 %43, i32 %.02963, i32 %.03460
  %.233.us.peel = select i1 %43, i32 1, i32 %.03161
  %exitcond.not.peel = icmp slt i32 %39, 2
  br i1 %exitcond.not.peel, label %._crit_edge53, label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.lr.ph.split.us, %.preheader.us
  %.02852.us = phi i32 [ %44, %.preheader.us ], [ 2, %.preheader.lr.ph.split.us ]
  %44 = add nuw i32 %.02852.us, 1
  %exitcond.not = icmp eq i32 %.02852.us, %smax
  br i1 %exitcond.not, label %._crit_edge53, label %.preheader.us, !llvm.loop !13

._crit_edge65:                                    ; preds = %._crit_edge53, %.preheader43
  %.034.lcssa = phi i32 [ -1, %.preheader43 ], [ %.135.lcssa, %._crit_edge53 ]
  %.031.lcssa = phi i32 [ -1, %.preheader43 ], [ %.132.lcssa, %._crit_edge53 ]
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %.034.lcssa, i32 noundef %.031.lcssa)
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %46 = phi i32 [ %56, %._crit_edge ], [ %37, %.preheader.lr.ph ]
  %47 = phi i32 [ %57, %._crit_edge ], [ %38, %.preheader.lr.ph ]
  %.02852 = phi i32 [ %59, %._crit_edge ], [ 1, %.preheader.lr.ph ]
  %.151 = phi i32 [ %.2, %._crit_edge ], [ %.03062, %.preheader.lr.ph ]
  %.13250 = phi i32 [ %.233, %._crit_edge ], [ %.03161, %.preheader.lr.ph ]
  %.13549 = phi i32 [ %.236, %._crit_edge ], [ %.03460, %.preheader.lr.ph ]
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %.lr.ph47, label %._crit_edge

._crit_edge53.loopexit:                           ; preds = %._crit_edge
  %.pre76 = load i32, ptr %1, align 4, !tbaa !9
  br label %._crit_edge53

._crit_edge53:                                    ; preds = %.preheader.lr.ph.split.us, %.preheader.us, %._crit_edge53.loopexit, %.preheader42
  %49 = phi i32 [ %36, %.preheader42 ], [ %.pre76, %._crit_edge53.loopexit ], [ %36, %.preheader.us ], [ %36, %.preheader.lr.ph.split.us ]
  %50 = phi i32 [ %37, %.preheader42 ], [ %56, %._crit_edge53.loopexit ], [ %37, %.preheader.us ], [ %37, %.preheader.lr.ph.split.us ]
  %51 = phi i32 [ %38, %.preheader42 ], [ %57, %._crit_edge53.loopexit ], [ %38, %.preheader.us ], [ %38, %.preheader.lr.ph.split.us ]
  %52 = phi i32 [ %39, %.preheader42 ], [ %56, %._crit_edge53.loopexit ], [ %39, %.preheader.us ], [ %39, %.preheader.lr.ph.split.us ]
  %53 = phi i32 [ %40, %.preheader42 ], [ %57, %._crit_edge53.loopexit ], [ %40, %.preheader.us ], [ %40, %.preheader.lr.ph.split.us ]
  %54 = phi i32 [ %41, %.preheader42 ], [ %56, %._crit_edge53.loopexit ], [ %39, %.preheader.us ], [ %39, %.preheader.lr.ph.split.us ]
  %.135.lcssa = phi i32 [ %.03460, %.preheader42 ], [ %.236, %._crit_edge53.loopexit ], [ %.236.us.peel, %.preheader.us ], [ %.236.us.peel, %.preheader.lr.ph.split.us ]
  %.132.lcssa = phi i32 [ %.03161, %.preheader42 ], [ %.233, %._crit_edge53.loopexit ], [ %.233.us.peel, %.preheader.us ], [ %.233.us.peel, %.preheader.lr.ph.split.us ]
  %.1.lcssa = phi i32 [ %.03062, %.preheader42 ], [ %.2, %._crit_edge53.loopexit ], [ 2000000000, %.preheader.us ], [ 2000000000, %.preheader.lr.ph.split.us ]
  %55 = add nuw nsw i32 %.02963, 1
  %.not.not = icmp slt i32 %.02963, %49
  br i1 %.not.not, label %.preheader42, label %._crit_edge65, !llvm.loop !15

._crit_edge.loopexit:                             ; preds = %.lr.ph47
  %.pre = load i32, ptr %2, align 4, !tbaa !9
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %56 = phi i32 [ %46, %.preheader ], [ %.pre, %._crit_edge.loopexit ]
  %57 = phi i32 [ %47, %.preheader ], [ %70, %._crit_edge.loopexit ]
  %.027.lcssa = phi i32 [ 2000000000, %.preheader ], [ %69, %._crit_edge.loopexit ]
  %58 = icmp sgt i32 %.027.lcssa, %.151
  %.236 = select i1 %58, i32 %.02963, i32 %.13549
  %.233 = select i1 %58, i32 %.02852, i32 %.13250
  %.2 = call i32 @llvm.smax.i32(i32 %.027.lcssa, i32 %.151)
  %59 = add nuw nsw i32 %.02852, 1
  %.not41.not = icmp slt i32 %.02852, %56
  br i1 %.not41.not, label %.preheader, label %._crit_edge53.loopexit, !llvm.loop !17

.lr.ph47:                                         ; preds = %.preheader, %.lr.ph47
  %indvars.iv73 = phi i64 [ %indvars.iv.next74, %.lr.ph47 ], [ 0, %.preheader ]
  %.02745 = phi i32 [ %69, %.lr.ph47 ], [ 2000000000, %.preheader ]
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv73) #7
  %61 = load i32, ptr %60, align 4, !tbaa !9
  %62 = sub nsw i32 %.02963, %61
  %63 = call noundef i32 @_Z4mabsi(i32 noundef %62)
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv73) #7
  %65 = load i32, ptr %64, align 4, !tbaa !9
  %66 = sub nsw i32 %.02852, %65
  %67 = call noundef i32 @_Z4mabsi(i32 noundef %66)
  %68 = add nsw i32 %67, %63
  %69 = call i32 @llvm.smin.i32(i32 %68, i32 %.02745)
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %70 = load i32, ptr %3, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = icmp slt i64 %indvars.iv.next74, %71
  br i1 %72, label %.lr.ph47, label %._crit_edge.loopexit, !llvm.loop !18

73:                                               ; preds = %28, %26
  %.pn = phi { ptr, i32 } [ %29, %28 ], [ %27, %26 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn
}

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #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 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12, !14}
!14 = !{!"llvm.loop.peeled.count", i32 1}
!15 = distinct !{!15, !12, !16}
!16 = !{!"llvm.loop.unswitch.partial.disable"}
!17 = distinct !{!17, !12, !16}
!18 = distinct !{!18, !12}


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