; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/150 Division 1/Problem C (C)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<std::pair<int, int>, std::pair<int, int>>, std::allocator<std::pair<std::pair<int, int>, std::pair<int, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::pair<int, int>, std::pair<int, int>>, std::allocator<std::pair<std::pair<int, int>, std::pair<int, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::pair<int, int>, std::pair<int, int>>, std::allocator<std::pair<std::pair<int, int>, std::pair<int, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::pair<int, int>, std::pair<int, int>>, std::allocator<std::pair<std::pair<int, int>, std::pair<int, int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<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::map" = type { %"class.std::_Rb_tree.3" }
%"class.std::_Rb_tree.3" = 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::pair" = type { %"struct.std::pair.7", %"struct.std::pair.7" }
%"struct.std::pair.7" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair.9" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@n = external dso_local global i32, align 4
@v = external dso_local global %"class.std::vector", align 8
@comp1 = external dso_local global %"class.std::set", align 8
@comp2 = external dso_local global %"class.std::set", align 8
@f1 = external dso_local global %"class.std::map", align 8
@f2 = external dso_local global %"class.std::map", align 8
@if1 = external dso_local global [2000 x i32], align 16
@if2 = external dso_local global [2000 x i32], align 16
@cnt1 = external dso_local global i32, align 4
@cnt2 = external dso_local global i32, align 4
@g = external dso_local global [2000 x [2000 x i32]], align 16
@ok = external dso_local global [2000 x [2000 x i32]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

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

64:                                               ; preds = %155, %0
  %65 = load i32, ptr %6, align 4, !tbaa !5
  %66 = load i32, ptr @n, align 4, !tbaa !5
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %158

69:                                               ; preds = %64
  %70 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.6, ptr noundef %4, ptr noundef %5)
  %71 = load i8, ptr %4, align 1, !tbaa !9
  %72 = sext i8 %71 to i32
  %73 = icmp eq i32 %72, 76
  br i1 %73, label %74, label %92

74:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %75 = load i32, ptr %2, align 4, !tbaa !5
  %76 = load i32, ptr %5, align 4, !tbaa !5
  %77 = sub nsw i32 %75, %76
  store i32 %77, ptr %9, align 4, !tbaa !5
  %78 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store i64 %78, ptr %8, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %79 = load i32, ptr %2, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %81 = load i32, ptr %3, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %12, align 4, !tbaa !5
  %83 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  store i64 %83, ptr %10, align 4
  %84 = call { i64, i64 } @_ZSt9make_pairISt4pairIiiES1_ES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %10)
  %85 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 0
  %86 = extractvalue { i64, i64 } %84, 0
  store i64 %86, ptr %85, align 4
  %87 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 1
  %88 = extractvalue { i64, i64 } %84, 1
  store i64 %88, ptr %87, align 4
  call void @_ZNSt6vectorISt4pairIS0_IiiES1_ESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) @v, ptr noundef nonnull align 4 dereferenceable(16) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #7
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = load i32, ptr %2, align 4, !tbaa !5
  %91 = sub nsw i32 %90, %89
  store i32 %91, ptr %2, align 4, !tbaa !5
  br label %154

92:                                               ; preds = %69
  %93 = load i8, ptr %4, align 1, !tbaa !9
  %94 = sext i8 %93 to i32
  %95 = icmp eq i32 %94, 82
  br i1 %95, label %96, label %113

96:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %97 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store i64 %97, ptr %14, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %98 = load i32, ptr %2, align 4, !tbaa !5
  %99 = load i32, ptr %5, align 4, !tbaa !5
  %100 = add nsw i32 %98, %99
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %102 = load i32, ptr %3, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %17, align 4, !tbaa !5
  %104 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  store i64 %104, ptr %15, align 4
  %105 = call { i64, i64 } @_ZSt9make_pairISt4pairIiiES1_ES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(8) %15)
  %106 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 0
  %107 = extractvalue { i64, i64 } %105, 0
  store i64 %107, ptr %106, align 4
  %108 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 1
  %109 = extractvalue { i64, i64 } %105, 1
  store i64 %109, ptr %108, align 4
  call void @_ZNSt6vectorISt4pairIS0_IiiES1_ESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) @v, ptr noundef nonnull align 4 dereferenceable(16) %13)
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  %110 = load i32, ptr %5, align 4, !tbaa !5
  %111 = load i32, ptr %2, align 4, !tbaa !5
  %112 = add nsw i32 %111, %110
  store i32 %112, ptr %2, align 4, !tbaa !5
  br label %153

113:                                              ; preds = %92
  %114 = load i8, ptr %4, align 1, !tbaa !9
  %115 = sext i8 %114 to i32
  %116 = icmp eq i32 %115, 85
  br i1 %116, label %117, label %134

117:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %118 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store i64 %118, ptr %19, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %119 = load i32, ptr %2, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %121 = load i32, ptr %3, align 4, !tbaa !5
  %122 = load i32, ptr %5, align 4, !tbaa !5
  %123 = add nsw i32 %121, %122
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %22, align 4, !tbaa !5
  %125 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %22)
  store i64 %125, ptr %20, align 4
  %126 = call { i64, i64 } @_ZSt9make_pairISt4pairIiiES1_ES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(8) %20)
  %127 = getelementptr inbounds { i64, i64 }, ptr %18, i32 0, i32 0
  %128 = extractvalue { i64, i64 } %126, 0
  store i64 %128, ptr %127, align 4
  %129 = getelementptr inbounds { i64, i64 }, ptr %18, i32 0, i32 1
  %130 = extractvalue { i64, i64 } %126, 1
  store i64 %130, ptr %129, align 4
  call void @_ZNSt6vectorISt4pairIS0_IiiES1_ESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) @v, ptr noundef nonnull align 4 dereferenceable(16) %18)
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  %131 = load i32, ptr %5, align 4, !tbaa !5
  %132 = load i32, ptr %3, align 4, !tbaa !5
  %133 = add nsw i32 %132, %131
  store i32 %133, ptr %3, align 4, !tbaa !5
  br label %152

134:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %135 = load i32, ptr %3, align 4, !tbaa !5
  %136 = load i32, ptr %5, align 4, !tbaa !5
  %137 = sub nsw i32 %135, %136
  store i32 %137, ptr %25, align 4, !tbaa !5
  %138 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %25)
  store i64 %138, ptr %24, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %139 = load i32, ptr %2, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %141 = load i32, ptr %3, align 4, !tbaa !5
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %28, align 4, !tbaa !5
  %143 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 4 dereferenceable(4) %28)
  store i64 %143, ptr %26, align 4
  %144 = call { i64, i64 } @_ZSt9make_pairISt4pairIiiES1_ES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(8) %24, ptr noundef nonnull align 4 dereferenceable(8) %26)
  %145 = getelementptr inbounds { i64, i64 }, ptr %23, i32 0, i32 0
  %146 = extractvalue { i64, i64 } %144, 0
  store i64 %146, ptr %145, align 4
  %147 = getelementptr inbounds { i64, i64 }, ptr %23, i32 0, i32 1
  %148 = extractvalue { i64, i64 } %144, 1
  store i64 %148, ptr %147, align 4
  call void @_ZNSt6vectorISt4pairIS0_IiiES1_ESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) @v, ptr noundef nonnull align 4 dereferenceable(16) %23)
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #7
  %149 = load i32, ptr %5, align 4, !tbaa !5
  %150 = load i32, ptr %3, align 4, !tbaa !5
  %151 = sub nsw i32 %150, %149
  store i32 %151, ptr %3, align 4, !tbaa !5
  br label %152

152:                                              ; preds = %134, %117
  br label %153

153:                                              ; preds = %152, %96
  br label %154

154:                                              ; preds = %153, %74
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %6, align 4, !tbaa !5
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %6, align 4, !tbaa !5
  br label %64, !llvm.loop !10

158:                                              ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %159 = call ptr @_ZNSt6vectorISt4pairIS0_IiiES1_ESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #7
  %160 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %29, i32 0, i32 0
  store ptr %159, ptr %160, align 8
  br label %161

161:                                              ; preds = %203, %158
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %162 = call ptr @_ZNSt6vectorISt4pairIS0_IiiES1_ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #7
  %163 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %30, i32 0, i32 0
  store ptr %162, ptr %163, align 8
  %164 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  br i1 %164, label %166, label %165

165:                                              ; preds = %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  br label %206

166:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  %167 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %29) #7
  %168 = getelementptr inbounds %"struct.std::pair", ptr %167, i32 0, i32 0
  %169 = getelementptr inbounds %"struct.std::pair.7", ptr %168, i32 0, i32 0
  %170 = load i32, ptr %169, align 4, !tbaa !12
  store i32 %170, ptr %31, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  %171 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %29) #7
  %172 = getelementptr inbounds %"struct.std::pair", ptr %171, i32 0, i32 0
  %173 = getelementptr inbounds %"struct.std::pair.7", ptr %172, i32 0, i32 1
  %174 = load i32, ptr %173, align 4, !tbaa !15
  store i32 %174, ptr %32, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  %175 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %29) #7
  %176 = getelementptr inbounds %"struct.std::pair", ptr %175, i32 0, i32 1
  %177 = getelementptr inbounds %"struct.std::pair.7", ptr %176, i32 0, i32 0
  %178 = load i32, ptr %177, align 4, !tbaa !16
  store i32 %178, ptr %33, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #7
  %179 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %29) #7
  %180 = getelementptr inbounds %"struct.std::pair", ptr %179, i32 0, i32 1
  %181 = getelementptr inbounds %"struct.std::pair.7", ptr %180, i32 0, i32 1
  %182 = load i32, ptr %181, align 4, !tbaa !17
  store i32 %182, ptr %34, align 4, !tbaa !5
  %183 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @comp1, ptr noundef nonnull align 4 dereferenceable(4) %31)
  %184 = getelementptr inbounds { ptr, i8 }, ptr %35, i32 0, i32 0
  %185 = extractvalue { ptr, i8 } %183, 0
  store ptr %185, ptr %184, align 8
  %186 = getelementptr inbounds { ptr, i8 }, ptr %35, i32 0, i32 1
  %187 = extractvalue { ptr, i8 } %183, 1
  store i8 %187, ptr %186, align 8
  %188 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @comp1, ptr noundef nonnull align 4 dereferenceable(4) %33)
  %189 = getelementptr inbounds { ptr, i8 }, ptr %36, i32 0, i32 0
  %190 = extractvalue { ptr, i8 } %188, 0
  store ptr %190, ptr %189, align 8
  %191 = getelementptr inbounds { ptr, i8 }, ptr %36, i32 0, i32 1
  %192 = extractvalue { ptr, i8 } %188, 1
  store i8 %192, ptr %191, align 8
  %193 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @comp2, ptr noundef nonnull align 4 dereferenceable(4) %32)
  %194 = getelementptr inbounds { ptr, i8 }, ptr %37, i32 0, i32 0
  %195 = extractvalue { ptr, i8 } %193, 0
  store ptr %195, ptr %194, align 8
  %196 = getelementptr inbounds { ptr, i8 }, ptr %37, i32 0, i32 1
  %197 = extractvalue { ptr, i8 } %193, 1
  store i8 %197, ptr %196, align 8
  %198 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @comp2, ptr noundef nonnull align 4 dereferenceable(4) %34)
  %199 = getelementptr inbounds { ptr, i8 }, ptr %38, i32 0, i32 0
  %200 = extractvalue { ptr, i8 } %198, 0
  store ptr %200, ptr %199, align 8
  %201 = getelementptr inbounds { ptr, i8 }, ptr %38, i32 0, i32 1
  %202 = extractvalue { ptr, i8 } %198, 1
  store i8 %202, ptr %201, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  br label %203

203:                                              ; preds = %166
  %204 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %29, i32 noundef 0) #7
  %205 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %39, i32 0, i32 0
  store ptr %204, ptr %205, align 8
  br label %161, !llvm.loop !18

206:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #7
  %207 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @comp1) #7
  %208 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %40, i32 0, i32 0
  store ptr %207, ptr %208, align 8
  br label %209

209:                                              ; preds = %224, %206
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #7
  %210 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @comp1) #7
  %211 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %41, i32 0, i32 0
  store ptr %210, ptr %211, align 8
  %212 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull align 8 dereferenceable(8) %41) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  br i1 %212, label %214, label %213

213:                                              ; preds = %209
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  br label %227

214:                                              ; preds = %209
  %215 = load i32, ptr @cnt1, align 4, !tbaa !5
  %216 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %40) #7
  %217 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @f1, ptr noundef nonnull align 4 dereferenceable(4) %216)
  store i32 %215, ptr %217, align 4, !tbaa !5
  %218 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %40) #7
  %219 = load i32, ptr %218, align 4, !tbaa !5
  %220 = load i32, ptr @cnt1, align 4, !tbaa !5
  %221 = add nsw i32 %220, 1
  store i32 %221, ptr @cnt1, align 4, !tbaa !5
  %222 = sext i32 %220 to i64
  %223 = getelementptr inbounds [2000 x i32], ptr @if1, i64 0, i64 %222
  store i32 %219, ptr %223, align 4, !tbaa !5
  br label %224

224:                                              ; preds = %214
  %225 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEi(ptr noundef nonnull align 8 dereferenceable(8) %40, i32 noundef 0) #7
  %226 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %42, i32 0, i32 0
  store ptr %225, ptr %226, align 8
  br label %209, !llvm.loop !19

227:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #7
  %228 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @comp2) #7
  %229 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %43, i32 0, i32 0
  store ptr %228, ptr %229, align 8
  br label %230

230:                                              ; preds = %245, %227
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #7
  %231 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @comp2) #7
  %232 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %44, i32 0, i32 0
  store ptr %231, ptr %232, align 8
  %233 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull align 8 dereferenceable(8) %44) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #7
  br i1 %233, label %235, label %234

234:                                              ; preds = %230
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #7
  br label %248

235:                                              ; preds = %230
  %236 = load i32, ptr @cnt2, align 4, !tbaa !5
  %237 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %43) #7
  %238 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @f2, ptr noundef nonnull align 4 dereferenceable(4) %237)
  store i32 %236, ptr %238, align 4, !tbaa !5
  %239 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %43) #7
  %240 = load i32, ptr %239, align 4, !tbaa !5
  %241 = load i32, ptr @cnt2, align 4, !tbaa !5
  %242 = add nsw i32 %241, 1
  store i32 %242, ptr @cnt2, align 4, !tbaa !5
  %243 = sext i32 %241 to i64
  %244 = getelementptr inbounds [2000 x i32], ptr @if2, i64 0, i64 %243
  store i32 %240, ptr %244, align 4, !tbaa !5
  br label %245

245:                                              ; preds = %235
  %246 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEi(ptr noundef nonnull align 8 dereferenceable(8) %43, i32 noundef 0) #7
  %247 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %45, i32 0, i32 0
  store ptr %246, ptr %247, align 8
  br label %230, !llvm.loop !20

248:                                              ; preds = %234
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #7
  %249 = call ptr @_ZNSt6vectorISt4pairIS0_IiiES1_ESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #7
  %250 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %46, i32 0, i32 0
  store ptr %249, ptr %250, align 8
  br label %251

251:                                              ; preds = %305, %248
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #7
  %252 = call ptr @_ZNSt6vectorISt4pairIS0_IiiES1_ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #7
  %253 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %47, i32 0, i32 0
  store ptr %252, ptr %253, align 8
  %254 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull align 8 dereferenceable(8) %47) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #7
  br i1 %254, label %256, label %255

255:                                              ; preds = %251
  store i32 14, ptr %48, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #7
  br label %308

256:                                              ; preds = %251
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #7
  %257 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #7
  %258 = getelementptr inbounds %"struct.std::pair", ptr %257, i32 0, i32 0
  %259 = getelementptr inbounds %"struct.std::pair.7", ptr %258, i32 0, i32 0
  %260 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @f1, ptr noundef nonnull align 4 dereferenceable(4) %259)
  %261 = load i32, ptr %260, align 4, !tbaa !5
  store i32 %261, ptr %49, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #7
  %262 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #7
  %263 = getelementptr inbounds %"struct.std::pair", ptr %262, i32 0, i32 0
  %264 = getelementptr inbounds %"struct.std::pair.7", ptr %263, i32 0, i32 1
  %265 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @f2, ptr noundef nonnull align 4 dereferenceable(4) %264)
  %266 = load i32, ptr %265, align 4, !tbaa !5
  store i32 %266, ptr %50, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #7
  %267 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #7
  %268 = getelementptr inbounds %"struct.std::pair", ptr %267, i32 0, i32 1
  %269 = getelementptr inbounds %"struct.std::pair.7", ptr %268, i32 0, i32 0
  %270 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @f1, ptr noundef nonnull align 4 dereferenceable(4) %269)
  %271 = load i32, ptr %270, align 4, !tbaa !5
  store i32 %271, ptr %51, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #7
  %272 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #7
  %273 = getelementptr inbounds %"struct.std::pair", ptr %272, i32 0, i32 1
  %274 = getelementptr inbounds %"struct.std::pair.7", ptr %273, i32 0, i32 1
  %275 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @f2, ptr noundef nonnull align 4 dereferenceable(4) %274)
  %276 = load i32, ptr %275, align 4, !tbaa !5
  store i32 %276, ptr %52, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #7
  %277 = load i32, ptr %49, align 4, !tbaa !5
  store i32 %277, ptr %53, align 4, !tbaa !5
  br label %278

278:                                              ; preds = %301, %256
  %279 = load i32, ptr %53, align 4, !tbaa !5
  %280 = load i32, ptr %51, align 4, !tbaa !5
  %281 = icmp slt i32 %279, %280
  br i1 %281, label %283, label %282

282:                                              ; preds = %278
  store i32 17, ptr %48, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #7
  br label %304

283:                                              ; preds = %278
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #7
  %284 = load i32, ptr %50, align 4, !tbaa !5
  store i32 %284, ptr %54, align 4, !tbaa !5
  br label %285

285:                                              ; preds = %297, %283
  %286 = load i32, ptr %54, align 4, !tbaa !5
  %287 = load i32, ptr %52, align 4, !tbaa !5
  %288 = icmp slt i32 %286, %287
  br i1 %288, label %290, label %289

289:                                              ; preds = %285
  store i32 20, ptr %48, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #7
  br label %300

290:                                              ; preds = %285
  %291 = load i32, ptr %53, align 4, !tbaa !5
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds [2000 x [2000 x i32]], ptr @g, i64 0, i64 %292
  %294 = load i32, ptr %54, align 4, !tbaa !5
  %295 = sext i32 %294 to i64
  %296 = getelementptr inbounds [2000 x i32], ptr %293, i64 0, i64 %295
  store i32 1, ptr %296, align 4, !tbaa !5
  br label %297

297:                                              ; preds = %290
  %298 = load i32, ptr %54, align 4, !tbaa !5
  %299 = add nsw i32 %298, 1
  store i32 %299, ptr %54, align 4, !tbaa !5
  br label %285, !llvm.loop !21

300:                                              ; preds = %289
  br label %301

301:                                              ; preds = %300
  %302 = load i32, ptr %53, align 4, !tbaa !5
  %303 = add nsw i32 %302, 1
  store i32 %303, ptr %53, align 4, !tbaa !5
  br label %278, !llvm.loop !22

304:                                              ; preds = %282
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #7
  br label %305

305:                                              ; preds = %304
  %306 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %46, i32 noundef 0) #7
  %307 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %55, i32 0, i32 0
  store ptr %306, ptr %307, align 8
  br label %251, !llvm.loop !23

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

309:                                              ; preds = %344, %308
  %310 = load i32, ptr %56, align 4, !tbaa !5
  %311 = load i32, ptr @cnt1, align 4, !tbaa !5
  %312 = icmp slt i32 %310, %311
  br i1 %312, label %314, label %313

313:                                              ; preds = %309
  store i32 23, ptr %48, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #7
  br label %347

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

315:                                              ; preds = %340, %314
  %316 = load i32, ptr %57, align 4, !tbaa !5
  %317 = load i32, ptr @cnt2, align 4, !tbaa !5
  %318 = icmp slt i32 %316, %317
  br i1 %318, label %320, label %319

319:                                              ; preds = %315
  store i32 26, ptr %48, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #7
  br label %343

320:                                              ; preds = %315
  %321 = load i32, ptr %56, align 4, !tbaa !5
  %322 = icmp eq i32 %321, 0
  br i1 %322, label %336, label %323

323:                                              ; preds = %320
  %324 = load i32, ptr %56, align 4, !tbaa !5
  %325 = load i32, ptr @cnt1, align 4, !tbaa !5
  %326 = sub nsw i32 %325, 1
  %327 = icmp eq i32 %324, %326
  br i1 %327, label %336, label %328

328:                                              ; preds = %323
  %329 = load i32, ptr %57, align 4, !tbaa !5
  %330 = icmp eq i32 %329, 0
  br i1 %330, label %336, label %331

331:                                              ; preds = %328
  %332 = load i32, ptr %57, align 4, !tbaa !5
  %333 = load i32, ptr @cnt2, align 4, !tbaa !5
  %334 = sub nsw i32 %333, 1
  %335 = icmp eq i32 %332, %334
  br i1 %335, label %336, label %339

336:                                              ; preds = %331, %328, %323, %320
  %337 = load i32, ptr %56, align 4, !tbaa !5
  %338 = load i32, ptr %57, align 4, !tbaa !5
  call void @_Z3dfsii(i32 noundef %337, i32 noundef %338)
  br label %339

339:                                              ; preds = %336, %331
  br label %340

340:                                              ; preds = %339
  %341 = load i32, ptr %57, align 4, !tbaa !5
  %342 = add nsw i32 %341, 1
  store i32 %342, ptr %57, align 4, !tbaa !5
  br label %315, !llvm.loop !24

343:                                              ; preds = %319
  br label %344

344:                                              ; preds = %343
  %345 = load i32, ptr %56, align 4, !tbaa !5
  %346 = add nsw i32 %345, 1
  store i32 %346, ptr %56, align 4, !tbaa !5
  br label %309, !llvm.loop !25

347:                                              ; preds = %313
  %348 = load i32, ptr @cnt1, align 4, !tbaa !5
  %349 = add nsw i32 %348, -1
  store i32 %349, ptr @cnt1, align 4, !tbaa !5
  %350 = load i32, ptr @cnt2, align 4, !tbaa !5
  %351 = add nsw i32 %350, -1
  store i32 %351, ptr @cnt2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #7
  store i64 0, ptr %58, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #7
  store i32 0, ptr %59, align 4, !tbaa !5
  br label %352

352:                                              ; preds = %405, %347
  %353 = load i32, ptr %59, align 4, !tbaa !5
  %354 = load i32, ptr @cnt1, align 4, !tbaa !5
  %355 = icmp slt i32 %353, %354
  br i1 %355, label %357, label %356

356:                                              ; preds = %352
  store i32 29, ptr %48, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #7
  br label %408

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

358:                                              ; preds = %401, %357
  %359 = load i32, ptr %60, align 4, !tbaa !5
  %360 = load i32, ptr @cnt2, align 4, !tbaa !5
  %361 = icmp slt i32 %359, %360
  br i1 %361, label %363, label %362

362:                                              ; preds = %358
  store i32 32, ptr %48, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #7
  br label %404

363:                                              ; preds = %358
  %364 = load i32, ptr %59, align 4, !tbaa !5
  %365 = sext i32 %364 to i64
  %366 = getelementptr inbounds [2000 x [2000 x i32]], ptr @ok, i64 0, i64 %365
  %367 = load i32, ptr %60, align 4, !tbaa !5
  %368 = sext i32 %367 to i64
  %369 = getelementptr inbounds [2000 x i32], ptr %366, i64 0, i64 %368
  %370 = load i32, ptr %369, align 4, !tbaa !5
  %371 = icmp ne i32 %370, 0
  br i1 %371, label %372, label %373

372:                                              ; preds = %363
  br label %401

373:                                              ; preds = %363
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #7
  %374 = load i32, ptr %59, align 4, !tbaa !5
  %375 = add nsw i32 %374, 1
  %376 = sext i32 %375 to i64
  %377 = getelementptr inbounds [2000 x i32], ptr @if1, i64 0, i64 %376
  %378 = load i32, ptr %377, align 4, !tbaa !5
  %379 = load i32, ptr %59, align 4, !tbaa !5
  %380 = sext i32 %379 to i64
  %381 = getelementptr inbounds [2000 x i32], ptr @if1, i64 0, i64 %380
  %382 = load i32, ptr %381, align 4, !tbaa !5
  %383 = sub nsw i32 %378, %382
  %384 = sext i32 %383 to i64
  store i64 %384, ptr %61, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %62) #7
  %385 = load i32, ptr %60, align 4, !tbaa !5
  %386 = add nsw i32 %385, 1
  %387 = sext i32 %386 to i64
  %388 = getelementptr inbounds [2000 x i32], ptr @if2, i64 0, i64 %387
  %389 = load i32, ptr %388, align 4, !tbaa !5
  %390 = load i32, ptr %60, align 4, !tbaa !5
  %391 = sext i32 %390 to i64
  %392 = getelementptr inbounds [2000 x i32], ptr @if2, i64 0, i64 %391
  %393 = load i32, ptr %392, align 4, !tbaa !5
  %394 = sub nsw i32 %389, %393
  %395 = sext i32 %394 to i64
  store i64 %395, ptr %62, align 8, !tbaa !26
  %396 = load i64, ptr %61, align 8, !tbaa !26
  %397 = load i64, ptr %62, align 8, !tbaa !26
  %398 = mul nsw i64 %396, %397
  %399 = load i64, ptr %58, align 8, !tbaa !26
  %400 = add nsw i64 %399, %398
  store i64 %400, ptr %58, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #7
  br label %401

401:                                              ; preds = %373, %372
  %402 = load i32, ptr %60, align 4, !tbaa !5
  %403 = add nsw i32 %402, 1
  store i32 %403, ptr %60, align 4, !tbaa !5
  br label %358, !llvm.loop !28

404:                                              ; preds = %362
  br label %405

405:                                              ; preds = %404
  %406 = load i32, ptr %59, align 4, !tbaa !5
  %407 = add nsw i32 %406, 1
  store i32 %407, ptr %59, align 4, !tbaa !5
  br label %352, !llvm.loop !29

408:                                              ; preds = %356
  %409 = load i64, ptr %58, align 8, !tbaa !26
  %410 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %409)
  %411 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %410, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %48, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %412 = load i32, ptr %1, align 4
  ret i32 %412
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZSt9make_pairISt4pairIiiES1_ES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #0

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #5 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)) #0 align 2

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

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

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

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

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<std::pair<int, int>, std::pair<int, int>>, std::allocator<std::pair<std::pair<int, int>, std::pair<int, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::pair<int, int>, std::pair<int, int>>, std::allocator<std::pair<std::pair<int, int>, std::pair<int, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::pair<int, int>, std::pair<int, int>>, std::allocator<std::pair<std::pair<int, int>, std::pair<int, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::pair<int, int>, std::pair<int, int>>, std::allocator<std::pair<std::pair<int, int>, std::pair<int, int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<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::map" = type { %"class.std::_Rb_tree.3" }
%"class.std::_Rb_tree.3" = 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::pair" = type { %"struct.std::pair.7", %"struct.std::pair.7" }
%"struct.std::pair.7" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@n = external dso_local global i32, align 4
@v = external dso_local global %"class.std::vector", align 8
@comp1 = external dso_local global %"class.std::set", align 8
@comp2 = external dso_local global %"class.std::set", align 8
@f1 = external dso_local global %"class.std::map", align 8
@f2 = external dso_local global %"class.std::map", align 8
@if1 = external dso_local local_unnamed_addr global [2000 x i32], align 16
@if2 = external dso_local local_unnamed_addr global [2000 x i32], align 16
@cnt1 = external dso_local local_unnamed_addr global i32, align 4
@cnt2 = external dso_local local_unnamed_addr global i32, align 4
@g = external dso_local local_unnamed_addr global [2000 x [2000 x i32]], align 16
@ok = external dso_local local_unnamed_addr global [2000 x [2000 x i32]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

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

.lr.ph:                                           ; preds = %0
  %42 = getelementptr inbounds i8, ptr %16, i64 8
  %43 = getelementptr inbounds i8, ptr %11, i64 8
  %44 = getelementptr inbounds i8, ptr %5, i64 8
  %45 = getelementptr inbounds i8, ptr %21, i64 8
  br label %49

._crit_edge:                                      ; preds = %114, %0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #7
  %46 = call ptr @_ZNSt6vectorISt4pairIS0_IiiES1_ESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #7
  store ptr %46, ptr %27, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #7
  %47 = call ptr @_ZNSt6vectorISt4pairIS0_IiiES1_ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #7
  store ptr %47, ptr %28, align 8
  %48 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #7
  br i1 %48, label %.lr.ph64, label %._crit_edge65

49:                                               ; preds = %.lr.ph, %114
  %.062 = phi i32 [ 0, %.lr.ph ], [ %115, %114 ]
  %50 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.6, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %51 = load i8, ptr %3, align 1, !tbaa !9
  switch i8 %51, label %98 [
    i8 76, label %52
    i8 82, label %68
    i8 85, label %83
  ]

52:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  %53 = load i32, ptr %1, align 4, !tbaa !5
  %54 = load i32, ptr %4, align 4, !tbaa !5
  %55 = sub nsw i32 %53, %54
  store i32 %55, ptr %7, align 4, !tbaa !5
  %56 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i64 %56, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %57 = load i32, ptr %1, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  %59 = load i32, ptr %2, align 4, !tbaa !5
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %10, align 4, !tbaa !5
  %61 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  store i64 %61, ptr %8, align 8
  %62 = call { i64, i64 } @_ZSt9make_pairISt4pairIiiES1_ES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %8)
  %63 = extractvalue { i64, i64 } %62, 0
  store i64 %63, ptr %5, align 8
  %64 = extractvalue { i64, i64 } %62, 1
  store i64 %64, ptr %44, align 8
  call void @_ZNSt6vectorISt4pairIS0_IiiES1_ESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) @v, ptr noundef nonnull align 4 dereferenceable(16) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = load i32, ptr %1, align 4, !tbaa !5
  %67 = sub nsw i32 %66, %65
  store i32 %67, ptr %1, align 4, !tbaa !5
  br label %114

68:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %69 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i64 %69, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  %70 = load i32, ptr %1, align 4, !tbaa !5
  %71 = load i32, ptr %4, align 4, !tbaa !5
  %72 = add i32 %70, 1
  %73 = add i32 %72, %71
  store i32 %73, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #7
  %74 = load i32, ptr %2, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %15, align 4, !tbaa !5
  %76 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  store i64 %76, ptr %13, align 8
  %77 = call { i64, i64 } @_ZSt9make_pairISt4pairIiiES1_ES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(8) %13)
  %78 = extractvalue { i64, i64 } %77, 0
  store i64 %78, ptr %11, align 8
  %79 = extractvalue { i64, i64 } %77, 1
  store i64 %79, ptr %43, align 8
  call void @_ZNSt6vectorISt4pairIS0_IiiES1_ESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) @v, ptr noundef nonnull align 4 dereferenceable(16) %11)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  %80 = load i32, ptr %4, align 4, !tbaa !5
  %81 = load i32, ptr %1, align 4, !tbaa !5
  %82 = add nsw i32 %81, %80
  store i32 %82, ptr %1, align 4, !tbaa !5
  br label %114

83:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %84 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i64 %84, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #7
  %85 = load i32, ptr %1, align 4, !tbaa !5
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #7
  %87 = load i32, ptr %2, align 4, !tbaa !5
  %88 = load i32, ptr %4, align 4, !tbaa !5
  %89 = add i32 %87, 1
  %90 = add i32 %89, %88
  store i32 %90, ptr %20, align 4, !tbaa !5
  %91 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  store i64 %91, ptr %18, align 8
  %92 = call { i64, i64 } @_ZSt9make_pairISt4pairIiiES1_ES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(8) %17, ptr noundef nonnull align 4 dereferenceable(8) %18)
  %93 = extractvalue { i64, i64 } %92, 0
  store i64 %93, ptr %16, align 8
  %94 = extractvalue { i64, i64 } %92, 1
  store i64 %94, ptr %42, align 8
  call void @_ZNSt6vectorISt4pairIS0_IiiES1_ESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) @v, ptr noundef nonnull align 4 dereferenceable(16) %16)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  %95 = load i32, ptr %4, align 4, !tbaa !5
  %96 = load i32, ptr %2, align 4, !tbaa !5
  %97 = add nsw i32 %96, %95
  store i32 %97, ptr %2, align 4, !tbaa !5
  br label %114

98:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #7
  %99 = load i32, ptr %2, align 4, !tbaa !5
  %100 = load i32, ptr %4, align 4, !tbaa !5
  %101 = sub nsw i32 %99, %100
  store i32 %101, ptr %23, align 4, !tbaa !5
  %102 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %23)
  store i64 %102, ptr %22, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #7
  %103 = load i32, ptr %1, align 4, !tbaa !5
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #7
  %105 = load i32, ptr %2, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %26, align 4, !tbaa !5
  %107 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %26)
  store i64 %107, ptr %24, align 8
  %108 = call { i64, i64 } @_ZSt9make_pairISt4pairIiiES1_ES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 4 dereferenceable(8) %24)
  %109 = extractvalue { i64, i64 } %108, 0
  store i64 %109, ptr %21, align 8
  %110 = extractvalue { i64, i64 } %108, 1
  store i64 %110, ptr %45, align 8
  call void @_ZNSt6vectorISt4pairIS0_IiiES1_ESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) @v, ptr noundef nonnull align 4 dereferenceable(16) %21)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #7
  %111 = load i32, ptr %4, align 4, !tbaa !5
  %112 = load i32, ptr %2, align 4, !tbaa !5
  %113 = sub nsw i32 %112, %111
  store i32 %113, ptr %2, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %52, %83, %98, %68
  %115 = add nuw nsw i32 %.062, 1
  %116 = load i32, ptr @n, align 4, !tbaa !5
  %117 = icmp slt i32 %115, %116
  br i1 %117, label %49, label %._crit_edge, !llvm.loop !10

._crit_edge65:                                    ; preds = %.lr.ph64, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %33) #7
  %118 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @comp1) #7
  store ptr %118, ptr %33, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %34) #7
  %119 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @comp1) #7
  store ptr %119, ptr %34, align 8
  %120 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %34) #7
  br i1 %120, label %.lr.ph67, label %._crit_edge68

.lr.ph64:                                         ; preds = %._crit_edge, %.lr.ph64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %29) #7
  %121 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  %122 = load i32, ptr %121, align 4, !tbaa !12
  store i32 %122, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %30) #7
  %123 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  %124 = getelementptr inbounds i8, ptr %123, i64 4
  %125 = load i32, ptr %124, align 4, !tbaa !15
  store i32 %125, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %31) #7
  %126 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  %127 = getelementptr inbounds i8, ptr %126, i64 8
  %128 = load i32, ptr %127, align 4, !tbaa !16
  store i32 %128, ptr %31, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %32) #7
  %129 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  %130 = getelementptr inbounds i8, ptr %129, i64 12
  %131 = load i32, ptr %130, align 4, !tbaa !17
  store i32 %131, ptr %32, align 4, !tbaa !5
  %132 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @comp1, ptr noundef nonnull align 4 dereferenceable(4) %29)
  %133 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @comp1, ptr noundef nonnull align 4 dereferenceable(4) %31)
  %134 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @comp2, ptr noundef nonnull align 4 dereferenceable(4) %30)
  %135 = call { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @comp2, ptr noundef nonnull align 4 dereferenceable(4) %32)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %32) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %30) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %29) #7
  %136 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %27, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #7
  %137 = call ptr @_ZNSt6vectorISt4pairIS0_IiiES1_ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #7
  store ptr %137, ptr %28, align 8
  %138 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #7
  br i1 %138, label %.lr.ph64, label %._crit_edge65, !llvm.loop !18

._crit_edge68:                                    ; preds = %.lr.ph67, %._crit_edge65
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %35) #7
  %139 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @comp2) #7
  store ptr %139, ptr %35, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %36) #7
  %140 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @comp2) #7
  store ptr %140, ptr %36, align 8
  %141 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(8) %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %36) #7
  br i1 %141, label %.lr.ph70, label %._crit_edge71

.lr.ph67:                                         ; preds = %._crit_edge65, %.lr.ph67
  %142 = load i32, ptr @cnt1, align 4, !tbaa !5
  %143 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #7
  %144 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @f1, ptr noundef nonnull align 4 dereferenceable(4) %143)
  store i32 %142, ptr %144, align 4, !tbaa !5
  %145 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #7
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = load i32, ptr @cnt1, align 4, !tbaa !5
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr @cnt1, align 4, !tbaa !5
  %149 = sext i32 %147 to i64
  %150 = getelementptr inbounds [2000 x i32], ptr @if1, i64 0, i64 %149
  store i32 %146, ptr %150, align 4, !tbaa !5
  %151 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEi(ptr noundef nonnull align 8 dereferenceable(8) %33, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %34) #7
  %152 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @comp1) #7
  store ptr %152, ptr %34, align 8
  %153 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %34) #7
  br i1 %153, label %.lr.ph67, label %._crit_edge68, !llvm.loop !19

._crit_edge71:                                    ; preds = %.lr.ph70, %._crit_edge68
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %35) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %37) #7
  %154 = call ptr @_ZNSt6vectorISt4pairIS0_IiiES1_ESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #7
  store ptr %154, ptr %37, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %38) #7
  %155 = call ptr @_ZNSt6vectorISt4pairIS0_IiiES1_ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #7
  store ptr %155, ptr %38, align 8
  %156 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %38) #7
  br i1 %156, label %.lr.ph78, label %._crit_edge79

.lr.ph70:                                         ; preds = %._crit_edge68, %.lr.ph70
  %157 = load i32, ptr @cnt2, align 4, !tbaa !5
  %158 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %35) #7
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @f2, ptr noundef nonnull align 4 dereferenceable(4) %158)
  store i32 %157, ptr %159, align 4, !tbaa !5
  %160 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %35) #7
  %161 = load i32, ptr %160, align 4, !tbaa !5
  %162 = load i32, ptr @cnt2, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr @cnt2, align 4, !tbaa !5
  %164 = sext i32 %162 to i64
  %165 = getelementptr inbounds [2000 x i32], ptr @if2, i64 0, i64 %164
  store i32 %161, ptr %165, align 4, !tbaa !5
  %166 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEi(ptr noundef nonnull align 8 dereferenceable(8) %35, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %36) #7
  %167 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @comp2) #7
  store ptr %167, ptr %36, align 8
  %168 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(8) %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %36) #7
  br i1 %168, label %.lr.ph70, label %._crit_edge71, !llvm.loop !20

._crit_edge79:                                    ; preds = %._crit_edge76, %._crit_edge71
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %37) #7
  %169 = load i32, ptr @cnt1, align 4, !tbaa !5
  %170 = icmp sgt i32 %169, 0
  %.pre121 = load i32, ptr @cnt2, align 4, !tbaa !5
  br i1 %170, label %.preheader60.lr.ph, label %._crit_edge85.thread

._crit_edge85.thread:                             ; preds = %._crit_edge79
  %171 = add i32 %169, -1
  store i32 %171, ptr @cnt1, align 4, !tbaa !5
  %172 = add i32 %.pre121, -1
  store i32 %172, ptr @cnt2, align 4, !tbaa !5
  br label %._crit_edge93

.preheader60.lr.ph:                               ; preds = %._crit_edge79
  %173 = icmp sgt i32 %.pre121, 0
  br i1 %173, label %.preheader60, label %._crit_edge85

.lr.ph78:                                         ; preds = %._crit_edge71, %._crit_edge76
  %174 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #7
  %175 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @f1, ptr noundef nonnull align 4 dereferenceable(4) %174)
  %176 = load i32, ptr %175, align 4, !tbaa !5
  %177 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #7
  %178 = getelementptr inbounds i8, ptr %177, i64 4
  %179 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @f2, ptr noundef nonnull align 4 dereferenceable(4) %178)
  %180 = load i32, ptr %179, align 4, !tbaa !5
  %181 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #7
  %182 = getelementptr inbounds i8, ptr %181, i64 8
  %183 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @f1, ptr noundef nonnull align 4 dereferenceable(4) %182)
  %184 = load i32, ptr %183, align 4, !tbaa !5
  %185 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #7
  %186 = getelementptr inbounds i8, ptr %185, i64 12
  %187 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @f2, ptr noundef nonnull align 4 dereferenceable(4) %186)
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = icmp slt i32 %176, %184
  %190 = icmp slt i32 %180, %188
  %or.cond = select i1 %189, i1 %190, i1 false
  br i1 %or.cond, label %.preheader61.us.preheader, label %._crit_edge76

.preheader61.us.preheader:                        ; preds = %.lr.ph78
  %191 = sext i32 %180 to i64
  %192 = sext i32 %176 to i64
  %wide.trip.count105 = sext i32 %184 to i64
  %wide.trip.count = sext i32 %188 to i64
  %193 = sub nsw i64 %wide.trip.count, %191
  %min.iters.check = icmp ult i64 %193, 8
  %n.vec = and i64 %193, -8
  %ind.end = add nsw i64 %n.vec, %191
  %cmp.n = icmp eq i64 %193, %n.vec
  br label %.preheader61.us

.preheader61.us:                                  ; preds = %.preheader61.us.preheader, %._crit_edge74.us
  %indvars.iv102 = phi i64 [ %192, %.preheader61.us.preheader ], [ %indvars.iv.next103, %._crit_edge74.us ]
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %.preheader61.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader61.us ]
  %offset.idx = add i64 %index, %191
  %194 = getelementptr inbounds [2000 x [2000 x i32]], ptr @g, i64 0, i64 %indvars.iv102, i64 %offset.idx
  %195 = getelementptr inbounds i8, ptr %194, i64 16
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %194, align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %195, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %196 = icmp eq i64 %index.next, %n.vec
  br i1 %196, label %middle.block, label %vector.body, !llvm.loop !21

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge74.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader61.us
  %indvars.iv.ph = phi i64 [ %191, %.preheader61.us ], [ %ind.end, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %197 = getelementptr inbounds [2000 x [2000 x i32]], ptr @g, i64 0, i64 %indvars.iv102, i64 %indvars.iv
  store i32 1, ptr %197, align 4, !tbaa !5
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge74.us, label %scalar.ph, !llvm.loop !24

._crit_edge74.us:                                 ; preds = %scalar.ph, %middle.block
  %indvars.iv.next103 = add nsw i64 %indvars.iv102, 1
  %exitcond106.not = icmp eq i64 %indvars.iv.next103, %wide.trip.count105
  br i1 %exitcond106.not, label %._crit_edge76, label %.preheader61.us, !llvm.loop !25

._crit_edge76:                                    ; preds = %._crit_edge74.us, %.lr.ph78
  %198 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %37, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %38) #7
  %199 = call ptr @_ZNSt6vectorISt4pairIS0_IiiES1_ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #7
  store ptr %199, ptr %38, align 8
  %200 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %38) #7
  br i1 %200, label %.lr.ph78, label %._crit_edge79, !llvm.loop !26

.preheader60:                                     ; preds = %.preheader60.lr.ph, %._crit_edge82
  %201 = phi i32 [ %235, %._crit_edge82 ], [ %.pre121, %.preheader60.lr.ph ]
  %202 = phi i32 [ %236, %._crit_edge82 ], [ %.pre121, %.preheader60.lr.ph ]
  %.05283 = phi i32 [ %237, %._crit_edge82 ], [ 0, %.preheader60.lr.ph ]
  %203 = icmp sgt i32 %202, 0
  br i1 %203, label %.lr.ph81, label %._crit_edge82

.lr.ph81:                                         ; preds = %.preheader60
  %204 = icmp eq i32 %.05283, 0
  br i1 %204, label %.lr.ph81.split.us, label %205

205:                                              ; preds = %.lr.ph81
  call void @_Z3dfsii(i32 noundef %.05283, i32 noundef 0)
  %.pre = load i32, ptr @cnt2, align 4, !tbaa !5
  %206 = icmp sgt i32 %.pre, 1
  br i1 %206, label %.lr.ph81.split.peel.next, label %._crit_edge82

.lr.ph81.split.peel.next:                         ; preds = %205
  %.pre119 = load i32, ptr @cnt1, align 4, !tbaa !5
  br label %.lr.ph81.split

.lr.ph81.split.us:                                ; preds = %.lr.ph81, %.lr.ph81.split.us
  %.05180.us = phi i32 [ %207, %.lr.ph81.split.us ], [ 0, %.lr.ph81 ]
  call void @_Z3dfsii(i32 noundef 0, i32 noundef %.05180.us)
  %207 = add nuw nsw i32 %.05180.us, 1
  %208 = load i32, ptr @cnt2, align 4, !tbaa !5
  %209 = icmp slt i32 %207, %208
  br i1 %209, label %.lr.ph81.split.us, label %._crit_edge82, !llvm.loop !27

._crit_edge85:                                    ; preds = %._crit_edge82, %.preheader60.lr.ph
  %210 = phi i32 [ %.pre121, %.preheader60.lr.ph ], [ %235, %._crit_edge82 ]
  %.lcssa = phi i32 [ %169, %.preheader60.lr.ph ], [ %238, %._crit_edge82 ]
  %211 = add i32 %.lcssa, -1
  store i32 %211, ptr @cnt1, align 4, !tbaa !5
  %212 = add i32 %210, -1
  store i32 %212, ptr @cnt2, align 4, !tbaa !5
  %213 = icmp sgt i32 %.lcssa, 1
  %214 = icmp sgt i32 %210, 1
  %or.cond130 = select i1 %213, i1 %214, i1 false
  br i1 %or.cond130, label %.preheader.us.preheader, label %._crit_edge93

.preheader.us.preheader:                          ; preds = %._crit_edge85
  %wide.trip.count116 = zext nneg i32 %211 to i64
  %wide.trip.count111 = zext i32 %212 to i64
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge89.us
  %indvars.iv113 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next114, %._crit_edge89.us ]
  %.05091.us = phi i64 [ 0, %.preheader.us.preheader ], [ %.2.us, %._crit_edge89.us ]
  %indvars.iv.next114 = add nuw nsw i64 %indvars.iv113, 1
  %215 = getelementptr inbounds [2000 x i32], ptr @if1, i64 0, i64 %indvars.iv.next114
  %216 = getelementptr inbounds [2000 x i32], ptr @if1, i64 0, i64 %indvars.iv113
  br label %217

217:                                              ; preds = %.preheader.us, %234
  %indvars.iv108 = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next109.pre-phi, %234 ]
  %.186.us = phi i64 [ %.05091.us, %.preheader.us ], [ %.2.us, %234 ]
  %218 = getelementptr inbounds [2000 x [2000 x i32]], ptr @ok, i64 0, i64 %indvars.iv113, i64 %indvars.iv108
  %219 = load i32, ptr %218, align 4, !tbaa !5
  %.not.us = icmp eq i32 %219, 0
  br i1 %.not.us, label %220, label %._crit_edge122

._crit_edge122:                                   ; preds = %217
  %.pre123 = add nuw nsw i64 %indvars.iv108, 1
  br label %234

220:                                              ; preds = %217
  %221 = load i32, ptr %215, align 4, !tbaa !5
  %222 = load i32, ptr %216, align 4, !tbaa !5
  %223 = sub nsw i32 %221, %222
  %224 = sext i32 %223 to i64
  %225 = add nuw nsw i64 %indvars.iv108, 1
  %226 = getelementptr inbounds [2000 x i32], ptr @if2, i64 0, i64 %225
  %227 = load i32, ptr %226, align 4, !tbaa !5
  %228 = getelementptr inbounds [2000 x i32], ptr @if2, i64 0, i64 %indvars.iv108
  %229 = load i32, ptr %228, align 4, !tbaa !5
  %230 = sub nsw i32 %227, %229
  %231 = sext i32 %230 to i64
  %232 = mul nsw i64 %231, %224
  %233 = add nsw i64 %232, %.186.us
  br label %234

234:                                              ; preds = %._crit_edge122, %220
  %indvars.iv.next109.pre-phi = phi i64 [ %.pre123, %._crit_edge122 ], [ %225, %220 ]
  %.2.us = phi i64 [ %.186.us, %._crit_edge122 ], [ %233, %220 ]
  %exitcond112.not = icmp eq i64 %indvars.iv.next109.pre-phi, %wide.trip.count111
  br i1 %exitcond112.not, label %._crit_edge89.us, label %217, !llvm.loop !28

._crit_edge89.us:                                 ; preds = %234
  %exitcond117.not = icmp eq i64 %indvars.iv.next114, %wide.trip.count116
  br i1 %exitcond117.not, label %._crit_edge93, label %.preheader.us, !llvm.loop !29

._crit_edge82:                                    ; preds = %247, %.lr.ph81.split.us, %205, %.preheader60
  %235 = phi i32 [ %201, %.preheader60 ], [ %.pre, %205 ], [ %208, %.lr.ph81.split.us ], [ %248, %247 ]
  %236 = phi i32 [ %202, %.preheader60 ], [ %.pre, %205 ], [ %208, %.lr.ph81.split.us ], [ %248, %247 ]
  %237 = add nuw nsw i32 %.05283, 1
  %238 = load i32, ptr @cnt1, align 4, !tbaa !5
  %239 = icmp slt i32 %237, %238
  br i1 %239, label %.preheader60, label %._crit_edge85, !llvm.loop !30

.lr.ph81.split:                                   ; preds = %.lr.ph81.split.peel.next, %247
  %240 = phi i32 [ %249, %247 ], [ %.pre119, %.lr.ph81.split.peel.next ]
  %241 = phi i32 [ %248, %247 ], [ %.pre, %.lr.ph81.split.peel.next ]
  %.05180 = phi i32 [ %250, %247 ], [ 1, %.lr.ph81.split.peel.next ]
  %242 = add nsw i32 %240, -1
  %243 = icmp eq i32 %.05283, %242
  %244 = add nsw i32 %241, -1
  %245 = icmp eq i32 %.05180, %244
  %or.cond59 = select i1 %243, i1 true, i1 %245
  br i1 %or.cond59, label %246, label %247

246:                                              ; preds = %.lr.ph81.split
  call void @_Z3dfsii(i32 noundef %.05283, i32 noundef %.05180)
  %.pre118 = load i32, ptr @cnt1, align 4, !tbaa !5
  %.pre120 = load i32, ptr @cnt2, align 4, !tbaa !5
  br label %247

247:                                              ; preds = %.lr.ph81.split, %246
  %248 = phi i32 [ %241, %.lr.ph81.split ], [ %.pre120, %246 ]
  %249 = phi i32 [ %240, %.lr.ph81.split ], [ %.pre118, %246 ]
  %250 = add nuw nsw i32 %.05180, 1
  %251 = icmp slt i32 %250, %248
  br i1 %251, label %.lr.ph81.split, label %._crit_edge82, !llvm.loop !32

._crit_edge93:                                    ; preds = %._crit_edge89.us, %._crit_edge85.thread, %._crit_edge85
  %.050.lcssa = phi i64 [ 0, %._crit_edge85 ], [ 0, %._crit_edge85.thread ], [ %.2.us, %._crit_edge89.us ]
  %252 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.050.lcssa)
  %253 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %252, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZSt9make_pairISt4pairIiiES1_ES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIS1_IiiES2_ESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(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 ptr @_ZNSt6vectorISt4pairIS0_IiiES1_ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #5 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 #0 align 2

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTSSt4pairIS_IiiES0_E", !14, i64 0, !14, i64 8}
!14 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!15 = !{!13, !6, i64 4}
!16 = !{!13, !6, i64 8}
!17 = !{!13, !6, i64 12}
!18 = distinct !{!18, !11}
!19 = distinct !{!19, !11}
!20 = distinct !{!20, !11}
!21 = distinct !{!21, !11, !22, !23}
!22 = !{!"llvm.loop.isvectorized", i32 1}
!23 = !{!"llvm.loop.unroll.runtime.disable"}
!24 = distinct !{!24, !11, !23, !22}
!25 = distinct !{!25, !11}
!26 = distinct !{!26, !11}
!27 = distinct !{!27, !11}
!28 = distinct !{!28, !11}
!29 = distinct !{!29, !11}
!30 = distinct !{!30, !11, !31}
!31 = !{!"llvm.loop.unswitch.partial.disable"}
!32 = distinct !{!32, !11, !33}
!33 = !{!"llvm.loop.peeled.count", i32 1}


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