; LLVM IR from lzyrapx/Competitive-Programming :: hihocoder (1034(离线平衡树))

; 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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"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.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair" = type { i32, i32 }

@a = external dso_local global [100005 x i32], align 16
@m = external dso_local global [100005 x i32], align 16
@r = external dso_local global [100005 x i32], align 16
@Lt = external dso_local global [100005 x %"class.std::vector"], align 16
@Rt = external dso_local global [100005 x %"class.std::vector"], align 16
@op = external dso_local global [100005 x %"class.std::vector"], align 16
@b = external dso_local global %"class.std::vector", align 8
@s = external dso_local global %"class.std::map", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1

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

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

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %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 i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %25 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %26 = alloca ptr, align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca ptr, align 8
  %30 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %41 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %42 = alloca i32, align 4
  %43 = alloca i64, align 8
  %44 = alloca i64, align 8
  %45 = alloca i64, align 8
  %46 = alloca i64, align 8
  %47 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %48 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %49 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %50 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %51 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %52 = alloca i32, align 4
  %53 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %54 = alloca i32, align 4
  %55 = alloca ptr, align 8
  %56 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %57 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %58 = alloca ptr, align 8
  %59 = alloca i32, align 4
  %60 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %61 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %62 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %63 = alloca i32, align 4
  %64 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %65 = alloca i32, align 4
  %66 = alloca i32, align 4
  %67 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %68 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %69 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %70 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  %71 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #9
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %88, %0
  %73 = load i32, ptr %4, align 4, !tbaa !5
  %74 = load i32, ptr %2, align 4, !tbaa !5
  %75 = icmp sle i32 %73, %74
  br i1 %75, label %77, label %76

76:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  br label %91

77:                                               ; preds = %72
  %78 = load i32, ptr %4, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i32, ptr @a, i64 %79
  %81 = load i32, ptr %4, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i32, ptr @m, i64 %82
  %84 = load i32, ptr %4, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i32, ptr @r, i64 %85
  %87 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.8, ptr noundef %80, ptr noundef %83, ptr noundef %86)
  br label %88

88:                                               ; preds = %77
  %89 = load i32, ptr %4, align 4, !tbaa !5
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %4, align 4, !tbaa !5
  br label %72, !llvm.loop !9

91:                                               ; preds = %76
  %92 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  br label %93

93:                                               ; preds = %98, %91
  %94 = load i32, ptr %3, align 4, !tbaa !5
  %95 = add nsw i32 %94, -1
  store i32 %95, ptr %3, align 4, !tbaa !5
  %96 = icmp ne i32 %94, 0
  br i1 %96, label %98, label %97

97:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  br label %108

98:                                               ; preds = %93
  %99 = 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)
  %100 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %99, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %101 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %100, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %102 = load i32, ptr %5, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @Lt, i64 0, i64 %103
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %104, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %105 = load i32, ptr %6, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @Rt, i64 0, i64 %106
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %107, ptr noundef nonnull align 4 dereferenceable(4) %7)
  br label %93, !llvm.loop !11

108:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 0, ptr %8, align 4, !tbaa !5
  %109 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %109, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  store i64 0, ptr %9, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %326, %108
  %113 = load i32, ptr %10, align 4, !tbaa !5
  %114 = load i32, ptr %2, align 4, !tbaa !5
  %115 = icmp sle i32 %113, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %112
  store i32 7, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  br label %329

117:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %118 = load i32, ptr %10, align 4, !tbaa !5
  %119 = sub nsw i32 %118, 1
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @Rt, i64 0, i64 %120
  store ptr %121, ptr %12, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %122 = load ptr, ptr %12, align 8, !tbaa !14
  %123 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %122) #9
  %124 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %123, ptr %124, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %125 = load ptr, ptr %12, align 8, !tbaa !14
  %126 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %125) #9
  %127 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %126, ptr %127, align 8
  br label %128

128:                                              ; preds = %188, %117
  %129 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #9
  br i1 %129, label %131, label %130

130:                                              ; preds = %128
  store i32 10, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  br label %190

131:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  store ptr %132, ptr %15, align 8, !tbaa !14
  %133 = load ptr, ptr %15, align 8, !tbaa !14
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(4) %133)
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = add nsw i32 %135, -1
  store i32 %136, ptr %134, align 4, !tbaa !5
  %137 = icmp ne i32 %136, 0
  br i1 %137, label %138, label %139

138:                                              ; preds = %131
  store i32 11, ptr %11, align 4
  br label %185

139:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %140 = load ptr, ptr %15, align 8, !tbaa !14
  %141 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE11lower_boundERS3_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(4) %140)
  %142 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %16, i32 0, i32 0
  store ptr %141, ptr %142, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #9
  %144 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %143) #9
  %145 = getelementptr inbounds %"struct.std::pair", ptr %144, i32 0, i32 0
  %146 = load i32, ptr %145, align 4, !tbaa !16
  store i32 %146, ptr %17, align 4, !tbaa !5
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #9
  %148 = load i32, ptr %10, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @op, i64 0, i64 %149
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  %151 = load i32, ptr %17, align 4, !tbaa !5
  %152 = load ptr, ptr %15, align 8, !tbaa !14
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = sub nsw i32 %151, %153
  store i32 %154, ptr %19, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %150, ptr noundef nonnull align 4 dereferenceable(4) %19)
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %156 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @s) #9
  %157 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %20, i32 0, i32 0
  store ptr %156, ptr %157, align 8
  %158 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiiEES5_(ptr noundef nonnull align 8 dereferenceable(8) %155, ptr noundef nonnull align 8 dereferenceable(8) %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  br i1 %158, label %159, label %179

159:                                              ; preds = %139
  %160 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #9
  %161 = getelementptr inbounds %"struct.std::pair", ptr %160, i32 0, i32 0
  %162 = load i32, ptr %161, align 4, !tbaa !16
  store i32 %162, ptr %18, align 4, !tbaa !5
  %163 = load i32, ptr %10, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @op, i64 0, i64 %164
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  %166 = load ptr, ptr %15, align 8, !tbaa !14
  %167 = load i32, ptr %166, align 4, !tbaa !5
  %168 = load i32, ptr %18, align 4, !tbaa !5
  %169 = sub nsw i32 %167, %168
  store i32 %169, ptr %21, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %165, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %170 = load i32, ptr %10, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @op, i64 0, i64 %171
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  %173 = load i32, ptr %18, align 4, !tbaa !5
  %174 = load i32, ptr %17, align 4, !tbaa !5
  %175 = sub nsw i32 %173, %174
  store i32 %175, ptr %22, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %172, ptr noundef nonnull align 4 dereferenceable(4) %22)
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  %176 = load i32, ptr %18, align 4, !tbaa !5
  %177 = load i32, ptr %17, align 4, !tbaa !5
  %178 = sub nsw i32 %176, %177
  store i32 %178, ptr %23, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) @b, ptr noundef nonnull align 4 dereferenceable(4) %23)
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  br label %179

179:                                              ; preds = %159, %139
  %180 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %180, i64 8, i1 false), !tbaa.struct !18
  %181 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %24, i32 0, i32 0
  %182 = load ptr, ptr %181, align 8
  %183 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5eraseB5cxx11ESt17_Rb_tree_iteratorIS4_E(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr %182)
  %184 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %25, i32 0, i32 0
  store ptr %183, ptr %184, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  store i32 0, ptr %11, align 4
  br label %185

185:                                              ; preds = %179, %138
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  %186 = load i32, ptr %11, align 4
  switch i32 %186, label %471 [
    i32 0, label %187
    i32 11, label %188
  ]

187:                                              ; preds = %185
  br label %188

188:                                              ; preds = %187, %185
  %189 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  br label %128

190:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %191 = load i32, ptr %10, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @Lt, i64 0, i64 %192
  store ptr %193, ptr %26, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  %194 = load ptr, ptr %26, align 8, !tbaa !14
  %195 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %194) #9
  %196 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  store ptr %195, ptr %196, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  %197 = load ptr, ptr %26, align 8, !tbaa !14
  %198 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %197) #9
  %199 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %198, ptr %199, align 8
  br label %200

200:                                              ; preds = %260, %190
  %201 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #9
  br i1 %201, label %203, label %202

202:                                              ; preds = %200
  store i32 12, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  br label %262

203:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #9
  %204 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #9
  store ptr %204, ptr %29, align 8, !tbaa !14
  %205 = load ptr, ptr %29, align 8, !tbaa !14
  %206 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(4) %205)
  %207 = load i32, ptr %206, align 4, !tbaa !5
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %206, align 4, !tbaa !5
  %209 = icmp ne i32 %207, 0
  br i1 %209, label %210, label %211

210:                                              ; preds = %203
  store i32 13, ptr %11, align 4
  br label %257

211:                                              ; preds = %203
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #9
  %212 = load ptr, ptr %29, align 8, !tbaa !14
  %213 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE11lower_boundERS3_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(4) %212)
  %214 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %30, i32 0, i32 0
  store ptr %213, ptr %214, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #9
  %215 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #9
  %216 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %215) #9
  %217 = getelementptr inbounds %"struct.std::pair", ptr %216, i32 0, i32 0
  %218 = load i32, ptr %217, align 4, !tbaa !16
  store i32 %218, ptr %31, align 4, !tbaa !5
  %219 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #9
  %220 = load i32, ptr %10, align 4, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @op, i64 0, i64 %221
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #9
  %223 = load ptr, ptr %29, align 8, !tbaa !14
  %224 = load i32, ptr %223, align 4, !tbaa !5
  %225 = load i32, ptr %31, align 4, !tbaa !5
  %226 = sub nsw i32 %224, %225
  store i32 %226, ptr %33, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %222, ptr noundef nonnull align 4 dereferenceable(4) %33)
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #9
  %227 = load ptr, ptr %29, align 8, !tbaa !14
  %228 = load i32, ptr %227, align 4, !tbaa !5
  %229 = load i32, ptr %31, align 4, !tbaa !5
  %230 = sub nsw i32 %228, %229
  store i32 %230, ptr %34, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) @b, ptr noundef nonnull align 4 dereferenceable(4) %34)
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  %231 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #9
  %232 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @s) #9
  %233 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %35, i32 0, i32 0
  store ptr %232, ptr %233, align 8
  %234 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiiEES5_(ptr noundef nonnull align 8 dereferenceable(8) %231, ptr noundef nonnull align 8 dereferenceable(8) %35) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #9
  br i1 %234, label %235, label %256

235:                                              ; preds = %211
  %236 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #9
  %237 = getelementptr inbounds %"struct.std::pair", ptr %236, i32 0, i32 0
  %238 = load i32, ptr %237, align 4, !tbaa !16
  store i32 %238, ptr %32, align 4, !tbaa !5
  %239 = load i32, ptr %10, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @op, i64 0, i64 %240
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #9
  %242 = load i32, ptr %32, align 4, !tbaa !5
  %243 = load ptr, ptr %29, align 8, !tbaa !14
  %244 = load i32, ptr %243, align 4, !tbaa !5
  %245 = sub nsw i32 %242, %244
  store i32 %245, ptr %36, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %241, ptr noundef nonnull align 4 dereferenceable(4) %36)
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #9
  %246 = load i32, ptr %32, align 4, !tbaa !5
  %247 = load ptr, ptr %29, align 8, !tbaa !14
  %248 = load i32, ptr %247, align 4, !tbaa !5
  %249 = sub nsw i32 %246, %248
  store i32 %249, ptr %37, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) @b, ptr noundef nonnull align 4 dereferenceable(4) %37)
  %250 = load i32, ptr %10, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @op, i64 0, i64 %251
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #9
  %253 = load i32, ptr %31, align 4, !tbaa !5
  %254 = load i32, ptr %32, align 4, !tbaa !5
  %255 = sub nsw i32 %253, %254
  store i32 %255, ptr %38, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %252, ptr noundef nonnull align 4 dereferenceable(4) %38)
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  br label %256

256:                                              ; preds = %235, %211
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #9
  store i32 0, ptr %11, align 4
  br label %257

257:                                              ; preds = %256, %210
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  %258 = load i32, ptr %11, align 4
  switch i32 %258, label %471 [
    i32 0, label %259
    i32 13, label %260
  ]

259:                                              ; preds = %257
  br label %260

260:                                              ; preds = %259, %257
  %261 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #9
  br label %200

262:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #9
  store i32 0, ptr %39, align 4, !tbaa !5
  %263 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(4) %39)
  %264 = load i32, ptr %263, align 4, !tbaa !5
  %265 = icmp sgt i32 %264, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #9
  br i1 %265, label %266, label %274

266:                                              ; preds = %262
  %267 = load i32, ptr %10, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [100005 x i32], ptr @a, i64 0, i64 %268
  %270 = load i32, ptr %269, align 4, !tbaa !5
  %271 = sext i32 %270 to i64
  %272 = load i64, ptr %9, align 8, !tbaa !12
  %273 = add nsw i64 %272, %271
  store i64 %273, ptr %9, align 8, !tbaa !12
  br label %325

274:                                              ; preds = %262
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #9
  %275 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @s) #9
  %276 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %40, i32 0, i32 0
  store ptr %275, ptr %276, align 8
  %277 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %40) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #9
  %278 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @s) #9
  %279 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %41, i32 0, i32 0
  store ptr %278, ptr %279, align 8
  %280 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiiEES5_(ptr noundef nonnull align 8 dereferenceable(8) %277, ptr noundef nonnull align 8 dereferenceable(8) %41) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #9
  br i1 %280, label %281, label %324

281:                                              ; preds = %274
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #9
  %282 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %40) #9
  %283 = getelementptr inbounds %"struct.std::pair", ptr %282, i32 0, i32 0
  %284 = load i32, ptr %283, align 4, !tbaa !16
  store i32 %284, ptr %42, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #9
  %285 = load i32, ptr %10, align 4, !tbaa !5
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds [100005 x i32], ptr @a, i64 0, i64 %286
  %288 = load i32, ptr %287, align 4, !tbaa !5
  %289 = sext i32 %288 to i64
  %290 = load i32, ptr %42, align 4, !tbaa !5
  %291 = sext i32 %290 to i64
  %292 = load i32, ptr %10, align 4, !tbaa !5
  %293 = sext i32 %292 to i64
  %294 = getelementptr inbounds [100005 x i32], ptr @r, i64 0, i64 %293
  %295 = load i32, ptr %294, align 4, !tbaa !5
  %296 = sext i32 %295 to i64
  %297 = mul nsw i64 %291, %296
  %298 = add nsw i64 %289, %297
  store i64 %298, ptr %43, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #9
  %299 = load i32, ptr %10, align 4, !tbaa !5
  %300 = sext i32 %299 to i64
  %301 = getelementptr inbounds [100005 x i32], ptr @m, i64 0, i64 %300
  %302 = load i32, ptr %301, align 4, !tbaa !5
  %303 = sext i32 %302 to i64
  store i64 %303, ptr %44, align 8, !tbaa !12
  %304 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull align 8 dereferenceable(8) %44)
  %305 = load i64, ptr %304, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #9
  %306 = load i32, ptr %42, align 4, !tbaa !5
  %307 = sext i32 %306 to i64
  %308 = load i32, ptr %10, align 4, !tbaa !5
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds [100005 x i32], ptr @r, i64 0, i64 %309
  %311 = load i32, ptr %310, align 4, !tbaa !5
  %312 = sext i32 %311 to i64
  %313 = mul nsw i64 %307, %312
  store i64 %313, ptr %45, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #9
  %314 = load i32, ptr %10, align 4, !tbaa !5
  %315 = sext i32 %314 to i64
  %316 = getelementptr inbounds [100005 x i32], ptr @m, i64 0, i64 %315
  %317 = load i32, ptr %316, align 4, !tbaa !5
  %318 = sext i32 %317 to i64
  store i64 %318, ptr %46, align 8, !tbaa !12
  %319 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull align 8 dereferenceable(8) %46)
  %320 = load i64, ptr %319, align 8, !tbaa !12
  %321 = sub nsw i64 %305, %320
  %322 = load i64, ptr %9, align 8, !tbaa !12
  %323 = add nsw i64 %322, %321
  store i64 %323, ptr %9, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #9
  br label %324

324:                                              ; preds = %281, %274
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #9
  br label %325

325:                                              ; preds = %324, %266
  br label %326

326:                                              ; preds = %325
  %327 = load i32, ptr %10, align 4, !tbaa !5
  %328 = add nsw i32 %327, 1
  store i32 %328, ptr %10, align 4, !tbaa !5
  br label %112, !llvm.loop !19

329:                                              ; preds = %116
  %330 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #9
  %331 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %47, i32 0, i32 0
  store ptr %330, ptr %331, align 8
  %332 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #9
  %333 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %48, i32 0, i32 0
  store ptr %332, ptr %333, align 8
  %334 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %47, i32 0, i32 0
  %335 = load ptr, ptr %334, align 8
  %336 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %48, i32 0, i32 0
  %337 = load ptr, ptr %336, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %335, ptr %337)
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #9
  %338 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #9
  %339 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %50, i32 0, i32 0
  store ptr %338, ptr %339, align 8
  %340 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #9
  %341 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %51, i32 0, i32 0
  store ptr %340, ptr %341, align 8
  %342 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %50, i32 0, i32 0
  %343 = load ptr, ptr %342, align 8
  %344 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %51, i32 0, i32 0
  %345 = load ptr, ptr %344, align 8
  %346 = call ptr @_ZSt6uniqueIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_(ptr %343, ptr %345)
  %347 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %49, i32 0, i32 0
  store ptr %346, ptr %347, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #9
  %348 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #9
  %349 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %53, i32 0, i32 0
  store ptr %348, ptr %349, align 8
  %350 = call noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull align 8 dereferenceable(8) %53) #9
  %351 = trunc i64 %350 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #9
  store i32 %351, ptr %52, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #9
  store i32 1, ptr %54, align 4, !tbaa !5
  br label %352

352:                                              ; preds = %464, %329
  %353 = load i32, ptr %54, align 4, !tbaa !5
  %354 = load i32, ptr %2, align 4, !tbaa !5
  %355 = icmp sle i32 %353, %354
  br i1 %355, label %357, label %356

356:                                              ; preds = %352
  store i32 14, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #9
  br label %467

357:                                              ; preds = %352
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #9
  %358 = load i32, ptr %54, align 4, !tbaa !5
  %359 = sext i32 %358 to i64
  %360 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @op, i64 0, i64 %359
  store ptr %360, ptr %55, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #9
  %361 = load ptr, ptr %55, align 8, !tbaa !14
  %362 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %361) #9
  %363 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %56, i32 0, i32 0
  store ptr %362, ptr %363, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #9
  %364 = load ptr, ptr %55, align 8, !tbaa !14
  %365 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %364) #9
  %366 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %57, i32 0, i32 0
  store ptr %365, ptr %366, align 8
  br label %367

367:                                              ; preds = %401, %357
  %368 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef nonnull align 8 dereferenceable(8) %57) #9
  br i1 %368, label %370, label %369

369:                                              ; preds = %367
  store i32 17, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #9
  br label %403

370:                                              ; preds = %367
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #9
  %371 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %56) #9
  store ptr %371, ptr %58, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #9
  %372 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #9
  %373 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %61, i32 0, i32 0
  store ptr %372, ptr %373, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %62, ptr align 8 %49, i64 8, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %63) #9
  %374 = load ptr, ptr %58, align 8, !tbaa !14
  %375 = load i32, ptr %374, align 4, !tbaa !5
  %376 = call i32 @llvm.abs.i32(i32 %375, i1 true)
  store i32 %376, ptr %63, align 4, !tbaa !5
  %377 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %61, i32 0, i32 0
  %378 = load ptr, ptr %377, align 8
  %379 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %62, i32 0, i32 0
  %380 = load ptr, ptr %379, align 8
  %381 = call ptr @_ZSt11upper_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr %378, ptr %380, ptr noundef nonnull align 4 dereferenceable(4) %63)
  %382 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %60, i32 0, i32 0
  store ptr %381, ptr %382, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #9
  %383 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #9
  %384 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %64, i32 0, i32 0
  store ptr %383, ptr %384, align 8
  %385 = call noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull align 8 dereferenceable(8) %64) #9
  %386 = trunc i64 %385 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %63) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #9
  store i32 %386, ptr %59, align 4, !tbaa !5
  %387 = load i32, ptr %59, align 4, !tbaa !5
  %388 = load ptr, ptr %58, align 8, !tbaa !14
  %389 = load i32, ptr %388, align 4, !tbaa !5
  %390 = load i32, ptr %52, align 4, !tbaa !5
  call void @_Z3addiii(i32 noundef %387, i32 noundef %389, i32 noundef %390)
  %391 = load ptr, ptr %58, align 8, !tbaa !14
  %392 = load i32, ptr %391, align 4, !tbaa !5
  %393 = icmp slt i32 %392, 0
  br i1 %393, label %394, label %397

394:                                              ; preds = %370
  %395 = load i32, ptr %59, align 4, !tbaa !5
  %396 = load i32, ptr %52, align 4, !tbaa !5
  call void @_Z3Addiii(i32 noundef %395, i32 noundef -1, i32 noundef %396)
  br label %400

397:                                              ; preds = %370
  %398 = load i32, ptr %59, align 4, !tbaa !5
  %399 = load i32, ptr %52, align 4, !tbaa !5
  call void @_Z3Addiii(i32 noundef %398, i32 noundef 1, i32 noundef %399)
  br label %400

400:                                              ; preds = %397, %394
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #9
  br label %401

401:                                              ; preds = %400
  %402 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %56) #9
  br label %367

403:                                              ; preds = %369
  %404 = load i32, ptr %54, align 4, !tbaa !5
  %405 = sext i32 %404 to i64
  %406 = getelementptr inbounds [100005 x i32], ptr @m, i64 0, i64 %405
  %407 = load i32, ptr %406, align 4, !tbaa !5
  %408 = icmp eq i32 %407, 0
  br i1 %408, label %415, label %409

409:                                              ; preds = %403
  %410 = load i32, ptr %54, align 4, !tbaa !5
  %411 = sext i32 %410 to i64
  %412 = getelementptr inbounds [100005 x i32], ptr @r, i64 0, i64 %411
  %413 = load i32, ptr %412, align 4, !tbaa !5
  %414 = icmp eq i32 %413, 0
  br i1 %414, label %415, label %416

415:                                              ; preds = %409, %403
  br label %464

416:                                              ; preds = %409
  call void @llvm.lifetime.start.p0(i64 4, ptr %65) #9
  %417 = load i32, ptr %54, align 4, !tbaa !5
  %418 = sext i32 %417 to i64
  %419 = getelementptr inbounds [100005 x i32], ptr @m, i64 0, i64 %418
  %420 = load i32, ptr %419, align 4, !tbaa !5
  %421 = sub nsw i32 %420, 1
  %422 = load i32, ptr %54, align 4, !tbaa !5
  %423 = sext i32 %422 to i64
  %424 = getelementptr inbounds [100005 x i32], ptr @r, i64 0, i64 %423
  %425 = load i32, ptr %424, align 4, !tbaa !5
  %426 = sdiv i32 %421, %425
  %427 = add nsw i32 %426, 1
  store i32 %427, ptr %65, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %67) #9
  %428 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #9
  %429 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %68, i32 0, i32 0
  store ptr %428, ptr %429, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %69, ptr align 8 %49, i64 8, i1 false), !tbaa.struct !18
  %430 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %68, i32 0, i32 0
  %431 = load ptr, ptr %430, align 8
  %432 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %69, i32 0, i32 0
  %433 = load ptr, ptr %432, align 8
  %434 = call ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr %431, ptr %433, ptr noundef nonnull align 4 dereferenceable(4) %65)
  %435 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %67, i32 0, i32 0
  store ptr %434, ptr %435, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %70) #9
  %436 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #9
  %437 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %70, i32 0, i32 0
  store ptr %436, ptr %437, align 8
  %438 = call noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull align 8 dereferenceable(8) %70) #9
  %439 = trunc i64 %438 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr %70) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #9
  store i32 %439, ptr %66, align 4, !tbaa !5
  %440 = load i32, ptr %52, align 4, !tbaa !5
  %441 = call noundef i32 @_Z3Sumi(i32 noundef %440)
  %442 = load i32, ptr %66, align 4, !tbaa !5
  %443 = call noundef i32 @_Z3Sumi(i32 noundef %442)
  %444 = sub nsw i32 %441, %443
  %445 = sext i32 %444 to i64
  %446 = load i32, ptr %54, align 4, !tbaa !5
  %447 = sext i32 %446 to i64
  %448 = getelementptr inbounds [100005 x i32], ptr @m, i64 0, i64 %447
  %449 = load i32, ptr %448, align 4, !tbaa !5
  %450 = sext i32 %449 to i64
  %451 = mul nsw i64 %445, %450
  %452 = load i64, ptr %9, align 8, !tbaa !12
  %453 = add nsw i64 %452, %451
  store i64 %453, ptr %9, align 8, !tbaa !12
  %454 = load i32, ptr %66, align 4, !tbaa !5
  %455 = call noundef i64 @_Z3sumi(i32 noundef %454)
  %456 = load i32, ptr %54, align 4, !tbaa !5
  %457 = sext i32 %456 to i64
  %458 = getelementptr inbounds [100005 x i32], ptr @r, i64 0, i64 %457
  %459 = load i32, ptr %458, align 4, !tbaa !5
  %460 = sext i32 %459 to i64
  %461 = mul nsw i64 %455, %460
  %462 = load i64, ptr %9, align 8, !tbaa !12
  %463 = add nsw i64 %462, %461
  store i64 %463, ptr %9, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %65) #9
  br label %464

464:                                              ; preds = %416, %415
  %465 = load i32, ptr %54, align 4, !tbaa !5
  %466 = add nsw i32 %465, 1
  store i32 %466, ptr %54, align 4, !tbaa !5
  br label %352, !llvm.loop !20

467:                                              ; preds = %356
  %468 = load i64, ptr %9, align 8, !tbaa !12
  %469 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, i64 noundef %468)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  %470 = load i32, ptr %1, align 4
  ret i32 %470

471:                                              ; preds = %257, %185
  unreachable
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE11lower_boundERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiiEES5_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5eraseB5cxx11ESt17_Rb_tree_iteratorIS4_E(ptr noundef nonnull align 8 dereferenceable(48), ptr) #4 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr, ptr) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt6uniqueIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_(ptr, ptr) #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11upper_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr, ptr, ptr noundef nonnull align 4 dereferenceable(4)) #7

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #8

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr, ptr, ptr noundef nonnull align 4 dereferenceable(4)) #7

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTSSt4pairIKiiE", !6, i64 0, !6, i64 4}
!18 = !{i64 0, i64 8, !14}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !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<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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"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.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }

@a = external dso_local global [100005 x i32], align 16
@m = external dso_local global [100005 x i32], align 16
@r = external dso_local global [100005 x i32], align 16
@Lt = external dso_local global [100005 x %"class.std::vector"], align 16
@Rt = external dso_local global [100005 x %"class.std::vector"], align 16
@op = external dso_local global [100005 x %"class.std::vector"], align 16
@b = external dso_local global %"class.std::vector", align 8
@s = external dso_local global %"class.std::map", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1

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

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

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %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 %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %26 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %33 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %34 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %35 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %36 = alloca i32, align 4
  %37 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %38 = alloca i32, align 4
  %39 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %40 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #9
  %41 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %42 = load i32, ptr %1, align 4, !tbaa !5
  %.not94 = icmp slt i32 %42, 1
  br i1 %.not94, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %43 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %45 = add nsw i32 %44, -1
  store i32 %45, ptr %2, align 4, !tbaa !5
  %.not8996 = icmp eq i32 %44, 0
  br i1 %.not8996, label %._crit_edge99, label %.lr.ph98

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %46 = getelementptr inbounds i32, ptr @a, i64 %indvars.iv
  %47 = getelementptr inbounds i32, ptr @m, i64 %indvars.iv
  %48 = getelementptr inbounds i32, ptr @r, i64 %indvars.iv
  %49 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.8, ptr noundef nonnull %46, ptr noundef nonnull %47, ptr noundef nonnull %48)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %50 = load i32, ptr %1, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %.not.not = icmp slt i64 %indvars.iv, %51
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge99:                                    ; preds = %.lr.ph98, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  store i32 0, ptr %6, align 4, !tbaa !5
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %52, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  %55 = load i32, ptr %1, align 4, !tbaa !5
  %.not90106 = icmp slt i32 %55, 1
  br i1 %.not90106, label %._crit_edge111, label %.lr.ph110

.lr.ph98:                                         ; preds = %._crit_edge, %.lr.ph98
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %57 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %56, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %57, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @Lt, i64 0, i64 %60
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %61, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %62 = load i32, ptr %4, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @Rt, i64 0, i64 %63
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %64, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %65 = load i32, ptr %2, align 4, !tbaa !5
  %66 = add nsw i32 %65, -1
  store i32 %66, ptr %2, align 4, !tbaa !5
  %.not89 = icmp eq i32 %65, 0
  br i1 %.not89, label %._crit_edge99, label %.lr.ph98, !llvm.loop !11

._crit_edge111:                                   ; preds = %185, %._crit_edge99
  %.086.lcssa = phi i64 [ 0, %._crit_edge99 ], [ %.2, %185 ]
  %67 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #9
  %68 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #9
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %67, ptr %68)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %31) #9
  %69 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #9
  %70 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #9
  %71 = call ptr @_ZSt6uniqueIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_(ptr %69, ptr %70)
  store ptr %71, ptr %31, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %32) #9
  %72 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #9
  store ptr %72, ptr %32, align 8
  %73 = call noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %32) #9
  %74 = trunc i64 %73 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #9
  %75 = load i32, ptr %1, align 4, !tbaa !5
  %.not91115 = icmp slt i32 %75, 1
  br i1 %.not91115, label %._crit_edge120, label %.lr.ph119

.lr.ph110:                                        ; preds = %._crit_edge99, %185
  %indvars.iv123 = phi i64 [ %indvars.iv.next124, %185 ], [ 1, %._crit_edge99 ]
  %.086108 = phi i64 [ %.2, %185 ], [ 0, %._crit_edge99 ]
  %76 = add nsw i64 %indvars.iv123, -1
  %77 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @Rt, i64 0, i64 %76
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %78 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %77) #9
  store ptr %78, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %79 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %77) #9
  store ptr %79, ptr %8, align 8
  %80 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #9
  br i1 %80, label %.lr.ph101, label %._crit_edge102

.lr.ph101:                                        ; preds = %.lr.ph110
  %81 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @op, i64 0, i64 %indvars.iv123
  br label %87

._crit_edge102:                                   ; preds = %112, %.lr.ph110
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  %82 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @Lt, i64 0, i64 %indvars.iv123
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #9
  %83 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %82) #9
  store ptr %83, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #9
  %84 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %82) #9
  store ptr %84, ptr %16, align 8
  %85 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #9
  br i1 %85, label %.lr.ph104, label %._crit_edge105

.lr.ph104:                                        ; preds = %._crit_edge102
  %86 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @op, i64 0, i64 %indvars.iv123
  br label %118

87:                                               ; preds = %.lr.ph101, %112
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(4) %88)
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = add nsw i32 %90, -1
  store i32 %91, ptr %89, align 4, !tbaa !5
  %.not93 = icmp eq i32 %91, 0
  br i1 %.not93, label %92, label %112

92:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  %93 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE11lower_boundERS3_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(4) %88)
  store ptr %93, ptr %9, align 8
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #9
  %95 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %94) #9
  %96 = load i32, ptr %95, align 4, !tbaa !12
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #9
  %98 = load i32, ptr %88, align 4, !tbaa !5
  %99 = sub nsw i32 %96, %98
  store i32 %99, ptr %10, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %81, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #9
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #9
  %101 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @s) #9
  store ptr %101, ptr %11, align 8
  %102 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiiEES5_(ptr noundef nonnull align 8 dereferenceable(8) %100, ptr noundef nonnull align 8 dereferenceable(8) %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  br i1 %102, label %103, label %109

103:                                              ; preds = %92
  %104 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #9
  %105 = load i32, ptr %104, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #9
  %106 = load i32, ptr %88, align 4, !tbaa !5
  %107 = sub nsw i32 %106, %105
  store i32 %107, ptr %12, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %81, ptr noundef nonnull align 4 dereferenceable(4) %12)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #9
  %108 = sub nsw i32 %105, %96
  store i32 %108, ptr %13, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %81, ptr noundef nonnull align 4 dereferenceable(4) %13)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #9
  store i32 %108, ptr %14, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) @b, ptr noundef nonnull align 4 dereferenceable(4) %14)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #9
  br label %109

109:                                              ; preds = %103, %92
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #9
  %.sroa.046.0.copyload = load ptr, ptr %110, align 8, !tbaa !14
  %111 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5eraseB5cxx11ESt17_Rb_tree_iteratorIS4_E(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr %.sroa.046.0.copyload)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  br label %112

112:                                              ; preds = %87, %109
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  %114 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #9
  br i1 %114, label %87, label %._crit_edge102

._crit_edge105:                                   ; preds = %145, %._crit_edge102
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #9
  store i32 0, ptr %24, align 4, !tbaa !5
  %115 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = icmp sgt i32 %116, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #9
  br i1 %117, label %148, label %153

118:                                              ; preds = %.lr.ph104, %145
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #9
  %120 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(4) %119)
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %120, align 4, !tbaa !5
  %.not92 = icmp eq i32 %121, 0
  br i1 %.not92, label %123, label %145

123:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #9
  %124 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE11lower_boundERS3_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 4 dereferenceable(4) %119)
  store ptr %124, ptr %17, align 8
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  %126 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %125) #9
  %127 = load i32, ptr %126, align 4, !tbaa !12
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #9
  %129 = load i32, ptr %119, align 4, !tbaa !5
  %130 = sub nsw i32 %129, %127
  store i32 %130, ptr %18, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %86, ptr noundef nonnull align 4 dereferenceable(4) %18)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #9
  %131 = load i32, ptr %119, align 4, !tbaa !5
  %132 = sub nsw i32 %131, %127
  store i32 %132, ptr %19, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) @b, ptr noundef nonnull align 4 dereferenceable(4) %19)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #9
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #9
  %134 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @s) #9
  store ptr %134, ptr %20, align 8
  %135 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiiEES5_(ptr noundef nonnull align 8 dereferenceable(8) %133, ptr noundef nonnull align 8 dereferenceable(8) %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #9
  br i1 %135, label %136, label %144

136:                                              ; preds = %123
  %137 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  %138 = load i32, ptr %137, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #9
  %139 = load i32, ptr %119, align 4, !tbaa !5
  %140 = sub nsw i32 %138, %139
  store i32 %140, ptr %21, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %86, ptr noundef nonnull align 4 dereferenceable(4) %21)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #9
  %141 = load i32, ptr %119, align 4, !tbaa !5
  %142 = sub nsw i32 %138, %141
  store i32 %142, ptr %22, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) @b, ptr noundef nonnull align 4 dereferenceable(4) %22)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #9
  %143 = sub nsw i32 %127, %138
  store i32 %143, ptr %23, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %86, ptr noundef nonnull align 4 dereferenceable(4) %23)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #9
  br label %144

144:                                              ; preds = %136, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #9
  br label %145

145:                                              ; preds = %118, %144
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #9
  %147 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #9
  br i1 %147, label %118, label %._crit_edge105

148:                                              ; preds = %._crit_edge105
  %149 = getelementptr inbounds [100005 x i32], ptr @a, i64 0, i64 %indvars.iv123
  %150 = load i32, ptr %149, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = add nsw i64 %.086108, %151
  br label %185

153:                                              ; preds = %._crit_edge105
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #9
  %154 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @s) #9
  store ptr %154, ptr %25, align 8
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #9
  %156 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @s) #9
  store ptr %156, ptr %26, align 8
  %157 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiiEES5_(ptr noundef nonnull align 8 dereferenceable(8) %155, ptr noundef nonnull align 8 dereferenceable(8) %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #9
  br i1 %157, label %158, label %184

158:                                              ; preds = %153
  %159 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #9
  %160 = load i32, ptr %159, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #9
  %161 = getelementptr inbounds [100005 x i32], ptr @a, i64 0, i64 %indvars.iv123
  %162 = load i32, ptr %161, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = sext i32 %160 to i64
  %165 = getelementptr inbounds [100005 x i32], ptr @r, i64 0, i64 %indvars.iv123
  %166 = load i32, ptr %165, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = mul nsw i64 %167, %164
  %169 = add nsw i64 %168, %163
  store i64 %169, ptr %27, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #9
  %170 = getelementptr inbounds [100005 x i32], ptr @m, i64 0, i64 %indvars.iv123
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  store i64 %172, ptr %28, align 8, !tbaa !16
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28)
  %174 = load i64, ptr %173, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #9
  %175 = load i32, ptr %165, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = mul nsw i64 %176, %164
  store i64 %177, ptr %29, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %30) #9
  %178 = load i32, ptr %170, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  store i64 %179, ptr %30, align 8, !tbaa !16
  %180 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %30)
  %181 = load i64, ptr %180, align 8, !tbaa !16
  %182 = add i64 %174, %.086108
  %183 = sub i64 %182, %181
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #9
  br label %184

184:                                              ; preds = %158, %153
  %.1 = phi i64 [ %183, %158 ], [ %.086108, %153 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #9
  br label %185

185:                                              ; preds = %148, %184
  %.2 = phi i64 [ %152, %148 ], [ %.1, %184 ]
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %186 = load i32, ptr %1, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %.not90.not = icmp slt i64 %indvars.iv123, %187
  br i1 %.not90.not, label %.lr.ph110, label %._crit_edge111, !llvm.loop !18

._crit_edge120:                                   ; preds = %234, %._crit_edge111
  %.3.lcssa = phi i64 [ %.086.lcssa, %._crit_edge111 ], [ %.4, %234 ]
  %188 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i64 noundef %.3.lcssa)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %31) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  ret i32 0

.lr.ph119:                                        ; preds = %._crit_edge111, %234
  %indvars.iv126 = phi i64 [ %indvars.iv.next127, %234 ], [ 1, %._crit_edge111 ]
  %.3117 = phi i64 [ %.4, %234 ], [ %.086.lcssa, %._crit_edge111 ]
  %189 = getelementptr inbounds [100005 x %"class.std::vector"], ptr @op, i64 0, i64 %indvars.iv126
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %33) #9
  %190 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %189) #9
  store ptr %190, ptr %33, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %34) #9
  %191 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %189) #9
  store ptr %191, ptr %34, align 8
  %192 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %34) #9
  br i1 %192, label %.lr.ph113, label %._crit_edge114

._crit_edge114:                                   ; preds = %.lr.ph113, %.lr.ph119
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %34) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #9
  %193 = getelementptr inbounds [100005 x i32], ptr @m, i64 0, i64 %indvars.iv126
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = icmp eq i32 %194, 0
  br i1 %195, label %234, label %208

.lr.ph113:                                        ; preds = %.lr.ph119, %.lr.ph113
  %196 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %35) #9
  %197 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #9
  %.sroa.03.0.copyload = load ptr, ptr %31, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %36) #9
  %198 = load i32, ptr %196, align 4, !tbaa !5
  %199 = call i32 @llvm.abs.i32(i32 %198, i1 true)
  store i32 %199, ptr %36, align 4, !tbaa !5
  %200 = call ptr @_ZSt11upper_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr %197, ptr %.sroa.03.0.copyload, ptr noundef nonnull align 4 dereferenceable(4) %36)
  store ptr %200, ptr %35, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %37) #9
  %201 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #9
  store ptr %201, ptr %37, align 8
  %202 = call noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(8) %37) #9
  %203 = trunc i64 %202 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %37) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %36) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %35) #9
  %204 = load i32, ptr %196, align 4, !tbaa !5
  call void @_Z3addiii(i32 noundef %203, i32 noundef %204, i32 noundef %74)
  %205 = load i32, ptr %196, align 4, !tbaa !5
  %.inv = icmp sgt i32 %205, -1
  %. = select i1 %.inv, i32 1, i32 -1
  call void @_Z3Addiii(i32 noundef %203, i32 noundef %., i32 noundef %74)
  %206 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #9
  %207 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %34) #9
  br i1 %207, label %.lr.ph113, label %._crit_edge114

208:                                              ; preds = %._crit_edge114
  %209 = getelementptr inbounds [100005 x i32], ptr @r, i64 0, i64 %indvars.iv126
  %210 = load i32, ptr %209, align 4, !tbaa !5
  %211 = icmp eq i32 %210, 0
  br i1 %211, label %234, label %212

212:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %38) #9
  %213 = add nsw i32 %194, -1
  %214 = sdiv i32 %213, %210
  %215 = add nsw i32 %214, 1
  store i32 %215, ptr %38, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %39) #9
  %216 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #9
  %.sroa.0.0.copyload = load ptr, ptr %31, align 8, !tbaa !14
  %217 = call ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr %216, ptr %.sroa.0.0.copyload, ptr noundef nonnull align 4 dereferenceable(4) %38)
  store ptr %217, ptr %39, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %40) #9
  %218 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @b) #9
  store ptr %218, ptr %40, align 8
  %219 = call noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 8 dereferenceable(8) %40) #9
  %220 = trunc i64 %219 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %40) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %39) #9
  %221 = call noundef i32 @_Z3Sumi(i32 noundef %74)
  %222 = call noundef i32 @_Z3Sumi(i32 noundef %220)
  %223 = sub nsw i32 %221, %222
  %224 = sext i32 %223 to i64
  %225 = load i32, ptr %193, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = mul nsw i64 %224, %226
  %228 = add nsw i64 %227, %.3117
  %229 = call noundef i64 @_Z3sumi(i32 noundef %220)
  %230 = load i32, ptr %209, align 4, !tbaa !5
  %231 = sext i32 %230 to i64
  %232 = mul nsw i64 %229, %231
  %233 = add nsw i64 %228, %232
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %38) #9
  br label %234

234:                                              ; preds = %._crit_edge114, %208, %212
  %.4 = phi i64 [ %.3117, %._crit_edge114 ], [ %.3117, %208 ], [ %233, %212 ]
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %235 = load i32, ptr %1, align 4, !tbaa !5
  %236 = sext i32 %235 to i64
  %.not91.not = icmp slt i64 %indvars.iv126, %236
  br i1 %.not91.not, label %.lr.ph119, label %._crit_edge120, !llvm.loop !19
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE11lower_boundERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEmmEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiiEES5_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5eraseB5cxx11ESt17_Rb_tree_iteratorIS4_E(ptr noundef nonnull align 8 dereferenceable(48), ptr) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr, ptr) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt6uniqueIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_(ptr, ptr) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN9__gnu_cxxmiIPiSt6vectorIiSaIiEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11upper_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr, ptr, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #7

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #8

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET_S7_S7_RKT0_(ptr, ptr, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #7

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

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = { 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 = { 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 #7 = { 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 #8 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nounwind }

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

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


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