; LLVM IR from DionysiosB/CodeForces :: 1100-1199 (1167C-NewsDistribution)

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

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [1 x i8], align 1

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca i64, align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #5
  %20 = load i64, ptr %2, align 8, !tbaa !5
  %21 = add nsw i64 %20, 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %21, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %22 unwind label %28

22:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 1, ptr %8, align 8, !tbaa !5
  br label %23

23:                                               ; preds = %36, %22
  %24 = load i64, ptr %8, align 8, !tbaa !5
  %25 = load i64, ptr %2, align 8, !tbaa !5
  %26 = icmp sle i64 %24, %25
  br i1 %26, label %32, label %27

27:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %39

28:                                               ; preds = %0
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %6, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  br label %147

32:                                               ; preds = %23
  %33 = load i64, ptr %8, align 8, !tbaa !5
  %34 = load i64, ptr %8, align 8, !tbaa !5
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %34) #5
  store i64 %33, ptr %35, align 8, !tbaa !5
  br label %36

36:                                               ; preds = %32
  %37 = load i64, ptr %8, align 8, !tbaa !5
  %38 = add nsw i64 %37, 1
  store i64 %38, ptr %8, align 8, !tbaa !5
  br label %23, !llvm.loop !9

39:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #5
  %40 = load i64, ptr %2, align 8, !tbaa !5
  %41 = add nsw i64 %40, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 1, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %41, ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %42 unwind label %53

42:                                               ; preds = %39
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %43

43:                                               ; preds = %112, %110, %42
  %44 = load i64, ptr %3, align 8, !tbaa !5
  %45 = add nsw i64 %44, -1
  store i64 %45, ptr %3, align 8, !tbaa !5
  %46 = icmp ne i64 %44, 0
  br i1 %46, label %47, label %115

47:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %48 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %12)
          to label %49 unwind label %57

49:                                               ; preds = %47
  %50 = load i64, ptr %12, align 8, !tbaa !5
  %51 = icmp sle i64 %50, 0
  br i1 %51, label %52, label %61

52:                                               ; preds = %49
  store i32 5, ptr %13, align 4
  br label %110, !llvm.loop !11

53:                                               ; preds = %39
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %6, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %146

57:                                               ; preds = %47
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %6, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %7, align 4
  br label %114

61:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %62 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %14)
          to label %63 unwind label %81

63:                                               ; preds = %61
  %64 = load i64, ptr %14, align 8, !tbaa !5
  %65 = invoke noundef i64 @_Z4findlRSt6vectorIlSaIlEE(i64 noundef %64, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %66 unwind label %81

66:                                               ; preds = %63
  store i64 %65, ptr %14, align 8, !tbaa !5
  br label %67

67:                                               ; preds = %107, %105, %66
  %68 = load i64, ptr %12, align 8, !tbaa !5
  %69 = add nsw i64 %68, -1
  store i64 %69, ptr %12, align 8, !tbaa !5
  %70 = icmp ne i64 %69, 0
  br i1 %70, label %71, label %109

71:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %72 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %15)
          to label %73 unwind label %85

73:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %74 = load i64, ptr %15, align 8, !tbaa !5
  %75 = invoke noundef i64 @_Z4findlRSt6vectorIlSaIlEE(i64 noundef %74, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %76 unwind label %89

76:                                               ; preds = %73
  store i64 %75, ptr %16, align 8, !tbaa !5
  %77 = load i64, ptr %14, align 8, !tbaa !5
  %78 = load i64, ptr %16, align 8, !tbaa !5
  %79 = icmp eq i64 %77, %78
  br i1 %79, label %80, label %93

80:                                               ; preds = %76
  store i32 7, ptr %13, align 4
  br label %105, !llvm.loop !12

81:                                               ; preds = %63, %61
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %6, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %7, align 4
  br label %113

85:                                               ; preds = %71
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %6, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %7, align 4
  br label %108

89:                                               ; preds = %73
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %6, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %108

93:                                               ; preds = %76
  %94 = load i64, ptr %14, align 8, !tbaa !5
  %95 = load i64, ptr %16, align 8, !tbaa !5
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %95) #5
  store i64 %94, ptr %96, align 8, !tbaa !5
  %97 = load i64, ptr %16, align 8, !tbaa !5
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %97) #5
  %99 = load i64, ptr %98, align 8, !tbaa !5
  %100 = load i64, ptr %14, align 8, !tbaa !5
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %100) #5
  %102 = load i64, ptr %101, align 8, !tbaa !5
  %103 = add nsw i64 %102, %99
  store i64 %103, ptr %101, align 8, !tbaa !5
  br label %104

104:                                              ; preds = %93
  store i32 0, ptr %13, align 4
  br label %105

105:                                              ; preds = %104, %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  %106 = load i32, ptr %13, align 4
  switch i32 %106, label %153 [
    i32 0, label %107
    i32 7, label %67
  ]

107:                                              ; preds = %105
  br label %67, !llvm.loop !12

108:                                              ; preds = %89, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %113

109:                                              ; preds = %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  store i32 0, ptr %13, align 4
  br label %110

110:                                              ; preds = %109, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %111 = load i32, ptr %13, align 4
  switch i32 %111, label %153 [
    i32 0, label %112
    i32 5, label %43
  ]

112:                                              ; preds = %110
  br label %43, !llvm.loop !11

113:                                              ; preds = %108, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %114

114:                                              ; preds = %113, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %145

115:                                              ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  store i64 1, ptr %17, align 8, !tbaa !5
  br label %116

116:                                              ; preds = %130, %115
  %117 = load i64, ptr %17, align 8, !tbaa !5
  %118 = load i64, ptr %2, align 8, !tbaa !5
  %119 = icmp sle i64 %117, %118
  br i1 %119, label %121, label %120

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

121:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %122 = load i64, ptr %17, align 8, !tbaa !5
  %123 = invoke noundef i64 @_Z4findlRSt6vectorIlSaIlEE(i64 noundef %122, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %124 unwind label %133

124:                                              ; preds = %121
  store i64 %123, ptr %18, align 8, !tbaa !5
  %125 = load i64, ptr %18, align 8, !tbaa !5
  %126 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %125) #5
  %127 = load i64, ptr %126, align 8, !tbaa !5
  %128 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %127)
          to label %129 unwind label %133

129:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %130

130:                                              ; preds = %129
  %131 = load i64, ptr %17, align 8, !tbaa !5
  %132 = add nsw i64 %131, 1
  store i64 %132, ptr %17, align 8, !tbaa !5
  br label %116, !llvm.loop !13

133:                                              ; preds = %124, %121
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %6, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %145

137:                                              ; preds = %120
  %138 = invoke i32 @puts(ptr noundef @.str.3)
          to label %139 unwind label %141

139:                                              ; preds = %137
  store i32 0, ptr %1, align 4
  store i32 1, ptr %13, align 4
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %140 = load i32, ptr %1, align 4
  ret i32 %140

141:                                              ; preds = %137
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %6, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %7, align 4
  br label %145

145:                                              ; preds = %141, %133, %114
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  br label %146

146:                                              ; preds = %145, %53
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  br label %147

147:                                              ; preds = %146, %28
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  br label %148

148:                                              ; preds = %147
  %149 = load ptr, ptr %6, align 8
  %150 = load i32, ptr %7, align 4
  %151 = insertvalue { ptr, i32 } poison, ptr %149, 0
  %152 = insertvalue { ptr, i32 } %151, i32 %150, 1
  resume { ptr, i32 } %152

153:                                              ; preds = %110, %105
  unreachable
}

; 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, ...) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 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 uwtable
declare dso_local void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

declare i32 @puts(ptr noundef) #4

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

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

attributes #0 = { 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 #1 = { 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 #2 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "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 = !{!"long", !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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [1 x i8], align 1

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

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

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

14:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  %15 = load i64, ptr %1, align 8, !tbaa !5
  %.not28 = icmp slt i64 %15, 1
  br i1 %.not28, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %14
  %.lcssa = phi i64 [ %15, %14 ], [ %21, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  %16 = add nsw i64 %.lcssa, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  store i64 1, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %16, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %22 unwind label %29

17:                                               ; preds = %0
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  br label %75

.lr.ph:                                           ; preds = %14, %.lr.ph
  %.01429 = phi i64 [ %20, %.lr.ph ], [ 1, %14 ]
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.01429) #5
  store i64 %.01429, ptr %19, align 8, !tbaa !5
  %20 = add nuw nsw i64 %.01429, 1
  %21 = load i64, ptr %1, align 8, !tbaa !5
  %.not.not = icmp slt i64 %.01429, %21
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

22:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  %23 = load i64, ptr %2, align 8, !tbaa !5
  %24 = add nsw i64 %23, -1
  store i64 %24, ptr %2, align 8, !tbaa !5
  %.not2134 = icmp eq i64 %23, 0
  br i1 %.not2134, label %.preheader, label %.lr.ph36

.preheader:                                       ; preds = %59, %22
  %25 = load i64, ptr %1, align 8, !tbaa !5
  %.not2237 = icmp slt i64 %25, 1
  br i1 %.not2237, label %._crit_edge40, label %.lr.ph39

.lr.ph36:                                         ; preds = %22, %59
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %8)
  %27 = load i64, ptr %8, align 8, !tbaa !5
  %28 = icmp slt i64 %27, 1
  br i1 %28, label %59, label %31, !llvm.loop !11

29:                                               ; preds = %._crit_edge
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %74

31:                                               ; preds = %.lr.ph36
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %9)
  %33 = load i64, ptr %9, align 8, !tbaa !5
  %34 = invoke noundef i64 @_Z4findlRSt6vectorIlSaIlEE(i64 noundef %33, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %35 unwind label %44

35:                                               ; preds = %31
  store i64 %34, ptr %9, align 8, !tbaa !5
  %36 = load i64, ptr %8, align 8, !tbaa !5
  %37 = add nsw i64 %36, -1
  store i64 %37, ptr %8, align 8, !tbaa !5
  %.not2330 = icmp eq i64 %37, 0
  br i1 %.not2330, label %._crit_edge33, label %.lr.ph32

.lr.ph32:                                         ; preds = %35, %56
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %38 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %10)
  %39 = load i64, ptr %10, align 8, !tbaa !5
  %40 = invoke noundef i64 @_Z4findlRSt6vectorIlSaIlEE(i64 noundef %39, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %41 unwind label %46

41:                                               ; preds = %.lr.ph32
  %42 = load i64, ptr %9, align 8, !tbaa !5
  %43 = icmp eq i64 %42, %40
  br i1 %43, label %56, label %48, !llvm.loop !12

44:                                               ; preds = %31
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %62

46:                                               ; preds = %.lr.ph32
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  br label %62

48:                                               ; preds = %41
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %40) #5
  store i64 %42, ptr %49, align 8, !tbaa !5
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %40) #5
  %51 = load i64, ptr %50, align 8, !tbaa !5
  %52 = load i64, ptr %9, align 8, !tbaa !5
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %52) #5
  %54 = load i64, ptr %53, align 8, !tbaa !5
  %55 = add nsw i64 %54, %51
  store i64 %55, ptr %53, align 8, !tbaa !5
  br label %56

56:                                               ; preds = %41, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  %57 = load i64, ptr %8, align 8, !tbaa !5
  %58 = add nsw i64 %57, -1
  store i64 %58, ptr %8, align 8, !tbaa !5
  %.not23 = icmp eq i64 %58, 0
  br i1 %.not23, label %._crit_edge33, label %.lr.ph32

._crit_edge33:                                    ; preds = %56, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %59

59:                                               ; preds = %.lr.ph36, %._crit_edge33
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  %60 = load i64, ptr %2, align 8, !tbaa !5
  %61 = add nsw i64 %60, -1
  store i64 %61, ptr %2, align 8, !tbaa !5
  %.not21 = icmp eq i64 %60, 0
  br i1 %.not21, label %.preheader, label %.lr.ph36

62:                                               ; preds = %46, %44
  %.pn = phi { ptr, i32 } [ %47, %46 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %73

._crit_edge40:                                    ; preds = %65, %.preheader
  %63 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i32 0

.lr.ph39:                                         ; preds = %.preheader, %65
  %.038 = phi i64 [ %69, %65 ], [ 1, %.preheader ]
  %64 = invoke noundef i64 @_Z4findlRSt6vectorIlSaIlEE(i64 noundef %.038, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %65 unwind label %71

65:                                               ; preds = %.lr.ph39
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %64) #5
  %67 = load i64, ptr %66, align 8, !tbaa !5
  %68 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %67)
  %69 = add nuw nsw i64 %.038, 1
  %70 = load i64, ptr %1, align 8, !tbaa !5
  %.not22.not = icmp slt i64 %.038, %70
  br i1 %.not22.not, label %.lr.ph39, label %._crit_edge40, !llvm.loop !13

71:                                               ; preds = %.lr.ph39
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %73

73:                                               ; preds = %71, %62
  %.pn.pn = phi { ptr, i32 } [ %.pn, %62 ], [ %72, %71 ]
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %74

74:                                               ; preds = %73, %29
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %73 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  br label %75

75:                                               ; preds = %74, %17
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %74 ], [ %18, %17 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn.pn.pn.pn
}

; 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 @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 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 uwtable
declare dso_local void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { 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 #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 = { 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 = !{!"long", !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}


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