; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/297 Division 2/Problem D (D)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::pair" = type { i32, i32 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@g = external dso_local global [2001 x [2001 x i32]], align 16
@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@q = external dso_local global %"class.std::queue", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z7inrangeii(i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::pair", align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"struct.std::pair", align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca %"struct.std::pair", align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca %"struct.std::pair", align 4
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca %"struct.std::pair", align 4
  %46 = alloca i32, align 4
  %47 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %48 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %49 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %50 = getelementptr i8, ptr %49, i64 -24
  %51 = load i64, ptr %50, align 8
  %52 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %51
  %53 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %52, ptr noundef null)
  %54 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %55 = getelementptr i8, ptr %54, i64 -24
  %56 = load i64, ptr %55, align 8
  %57 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %56
  %58 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %57, ptr noundef null)
  %59 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %59, ptr noundef nonnull align 4 dereferenceable(4) @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !8
  br label %61

61:                                               ; preds = %92, %0
  %62 = load i32, ptr %2, align 4, !tbaa !8
  %63 = load i32, ptr @n, align 4, !tbaa !8
  %64 = icmp sle i32 %62, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %61
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %95

66:                                               ; preds = %61
  %67 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 1, ptr %4, align 4, !tbaa !8
  br label %68

68:                                               ; preds = %88, %66
  %69 = load i32, ptr %4, align 4, !tbaa !8
  %70 = load i32, ptr @m, align 4, !tbaa !8
  %71 = icmp sle i32 %69, %70
  br i1 %71, label %73, label %72

72:                                               ; preds = %68
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %91

73:                                               ; preds = %68
  %74 = load i32, ptr %4, align 4, !tbaa !8
  %75 = sub nsw i32 %74, 1
  %76 = sext i32 %75 to i64
  %77 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %76)
  %78 = load i8, ptr %77, align 1, !tbaa !11
  %79 = sext i8 %78 to i32
  %80 = icmp eq i32 %79, 46
  %81 = zext i1 %80 to i32
  %82 = load i32, ptr %2, align 4, !tbaa !8
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %83
  %85 = load i32, ptr %4, align 4, !tbaa !8
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [2001 x i32], ptr %84, i64 0, i64 %86
  store i32 %81, ptr %87, align 4, !tbaa !8
  br label %88

88:                                               ; preds = %73
  %89 = load i32, ptr %4, align 4, !tbaa !8
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %4, align 4, !tbaa !8
  br label %68, !llvm.loop !12

91:                                               ; preds = %72
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %2, align 4, !tbaa !8
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %2, align 4, !tbaa !8
  br label %61, !llvm.loop !14

95:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 2, ptr %5, align 4, !tbaa !8
  br label %96

96:                                               ; preds = %160, %95
  %97 = load i32, ptr %5, align 4, !tbaa !8
  %98 = load i32, ptr @n, align 4, !tbaa !8
  %99 = icmp sle i32 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %96
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %163

101:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 2, ptr %6, align 4, !tbaa !8
  br label %102

102:                                              ; preds = %156, %101
  %103 = load i32, ptr %6, align 4, !tbaa !8
  %104 = load i32, ptr @m, align 4, !tbaa !8
  %105 = icmp sle i32 %103, %104
  br i1 %105, label %107, label %106

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

107:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 -1, ptr %9, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 -1, ptr %10, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !8
  br label %108

108:                                              ; preds = %147, %107
  %109 = load i32, ptr %11, align 4, !tbaa !8
  %110 = icmp slt i32 %109, 2
  br i1 %110, label %112, label %111

111:                                              ; preds = %108
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %150

112:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !8
  br label %113

113:                                              ; preds = %143, %112
  %114 = load i32, ptr %12, align 4, !tbaa !8
  %115 = icmp slt i32 %114, 2
  br i1 %115, label %117, label %116

116:                                              ; preds = %113
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %146

117:                                              ; preds = %113
  %118 = load i32, ptr %5, align 4, !tbaa !8
  %119 = load i32, ptr %11, align 4, !tbaa !8
  %120 = sub nsw i32 %118, %119
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %121
  %123 = load i32, ptr %6, align 4, !tbaa !8
  %124 = load i32, ptr %12, align 4, !tbaa !8
  %125 = sub nsw i32 %123, %124
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [2001 x i32], ptr %122, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !8
  %129 = icmp eq i32 %128, 1
  br i1 %129, label %130, label %133

130:                                              ; preds = %117
  %131 = load i32, ptr %7, align 4, !tbaa !8
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %7, align 4, !tbaa !8
  br label %142

133:                                              ; preds = %117
  %134 = load i32, ptr %8, align 4, !tbaa !8
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %8, align 4, !tbaa !8
  %136 = load i32, ptr %5, align 4, !tbaa !8
  %137 = load i32, ptr %11, align 4, !tbaa !8
  %138 = sub nsw i32 %136, %137
  store i32 %138, ptr %9, align 4, !tbaa !8
  %139 = load i32, ptr %6, align 4, !tbaa !8
  %140 = load i32, ptr %12, align 4, !tbaa !8
  %141 = sub nsw i32 %139, %140
  store i32 %141, ptr %10, align 4, !tbaa !8
  br label %142

142:                                              ; preds = %133, %130
  br label %143

143:                                              ; preds = %142
  %144 = load i32, ptr %12, align 4, !tbaa !8
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %12, align 4, !tbaa !8
  br label %113, !llvm.loop !15

146:                                              ; preds = %116
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %11, align 4, !tbaa !8
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %11, align 4, !tbaa !8
  br label %108, !llvm.loop !16

150:                                              ; preds = %111
  %151 = load i32, ptr %8, align 4, !tbaa !8
  %152 = icmp eq i32 %151, 1
  br i1 %152, label %153, label %155

153:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %154 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__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) %10)
  store i64 %154, ptr %13, align 4
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @q, ptr noundef nonnull align 4 dereferenceable(8) %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %155

155:                                              ; preds = %153, %150
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %156

156:                                              ; preds = %155
  %157 = load i32, ptr %6, align 4, !tbaa !8
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %6, align 4, !tbaa !8
  br label %102, !llvm.loop !17

159:                                              ; preds = %106
  br label %160

160:                                              ; preds = %159
  %161 = load i32, ptr %5, align 4, !tbaa !8
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %5, align 4, !tbaa !8
  br label %96, !llvm.loop !18

163:                                              ; preds = %100
  br label %164

164:                                              ; preds = %414, %412, %163
  %165 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @q)
  %166 = xor i1 %165, true
  br i1 %166, label %167, label %415

167:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %168 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) @q)
  %169 = getelementptr inbounds %"struct.std::pair", ptr %168, i32 0, i32 0
  %170 = load i32, ptr %169, align 4, !tbaa !19
  store i32 %170, ptr %14, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %171 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) @q)
  %172 = getelementptr inbounds %"struct.std::pair", ptr %171, i32 0, i32 1
  %173 = load i32, ptr %172, align 4, !tbaa !21
  store i32 %173, ptr %15, align 4, !tbaa !8
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) @q)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %174 = load i32, ptr %14, align 4, !tbaa !8
  store i32 %174, ptr %16, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %175 = load i32, ptr %15, align 4, !tbaa !8
  store i32 %175, ptr %17, align 4, !tbaa !8
  %176 = load i32, ptr %16, align 4, !tbaa !8
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %177
  %179 = load i32, ptr %17, align 4, !tbaa !8
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [2001 x i32], ptr %178, i64 0, i64 %180
  %182 = load i32, ptr %181, align 4, !tbaa !8
  %183 = icmp eq i32 %182, 1
  br i1 %183, label %184, label %185

184:                                              ; preds = %167
  store i32 20, ptr %3, align 4
  br label %412, !llvm.loop !22

185:                                              ; preds = %167
  %186 = load i32, ptr %16, align 4, !tbaa !8
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %187
  %189 = load i32, ptr %17, align 4, !tbaa !8
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [2001 x i32], ptr %188, i64 0, i64 %190
  store i32 1, ptr %191, align 4, !tbaa !8
  %192 = load i32, ptr %16, align 4, !tbaa !8
  %193 = sub nsw i32 %192, 1
  %194 = load i32, ptr %17, align 4, !tbaa !8
  %195 = sub nsw i32 %194, 1
  %196 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %193, i32 noundef %195)
  br i1 %196, label %197, label %246

197:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 -1, ptr %20, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 -1, ptr %21, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !8
  br label %198

198:                                              ; preds = %237, %197
  %199 = load i32, ptr %22, align 4, !tbaa !8
  %200 = icmp slt i32 %199, 2
  br i1 %200, label %202, label %201

201:                                              ; preds = %198
  store i32 22, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %240

202:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !8
  br label %203

203:                                              ; preds = %233, %202
  %204 = load i32, ptr %23, align 4, !tbaa !8
  %205 = icmp slt i32 %204, 2
  br i1 %205, label %207, label %206

206:                                              ; preds = %203
  store i32 25, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %236

207:                                              ; preds = %203
  %208 = load i32, ptr %14, align 4, !tbaa !8
  %209 = load i32, ptr %22, align 4, !tbaa !8
  %210 = sub nsw i32 %208, %209
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %211
  %213 = load i32, ptr %15, align 4, !tbaa !8
  %214 = load i32, ptr %23, align 4, !tbaa !8
  %215 = sub nsw i32 %213, %214
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [2001 x i32], ptr %212, i64 0, i64 %216
  %218 = load i32, ptr %217, align 4, !tbaa !8
  %219 = icmp eq i32 %218, 1
  br i1 %219, label %220, label %223

220:                                              ; preds = %207
  %221 = load i32, ptr %18, align 4, !tbaa !8
  %222 = add nsw i32 %221, 1
  store i32 %222, ptr %18, align 4, !tbaa !8
  br label %232

223:                                              ; preds = %207
  %224 = load i32, ptr %19, align 4, !tbaa !8
  %225 = add nsw i32 %224, 1
  store i32 %225, ptr %19, align 4, !tbaa !8
  %226 = load i32, ptr %14, align 4, !tbaa !8
  %227 = load i32, ptr %22, align 4, !tbaa !8
  %228 = sub nsw i32 %226, %227
  store i32 %228, ptr %20, align 4, !tbaa !8
  %229 = load i32, ptr %15, align 4, !tbaa !8
  %230 = load i32, ptr %23, align 4, !tbaa !8
  %231 = sub nsw i32 %229, %230
  store i32 %231, ptr %21, align 4, !tbaa !8
  br label %232

232:                                              ; preds = %223, %220
  br label %233

233:                                              ; preds = %232
  %234 = load i32, ptr %23, align 4, !tbaa !8
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %23, align 4, !tbaa !8
  br label %203, !llvm.loop !23

236:                                              ; preds = %206
  br label %237

237:                                              ; preds = %236
  %238 = load i32, ptr %22, align 4, !tbaa !8
  %239 = add nsw i32 %238, 1
  store i32 %239, ptr %22, align 4, !tbaa !8
  br label %198, !llvm.loop !24

240:                                              ; preds = %201
  %241 = load i32, ptr %19, align 4, !tbaa !8
  %242 = icmp eq i32 %241, 1
  br i1 %242, label %243, label %245

243:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %244 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %21)
  store i64 %244, ptr %24, align 4
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @q, ptr noundef nonnull align 4 dereferenceable(8) %24)
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %245

245:                                              ; preds = %243, %240
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %246

246:                                              ; preds = %245, %185
  %247 = load i32, ptr %16, align 4, !tbaa !8
  %248 = add nsw i32 %247, 1
  %249 = load i32, ptr %17, align 4, !tbaa !8
  %250 = add nsw i32 %249, 1
  %251 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %248, i32 noundef %250)
  br i1 %251, label %252, label %301

252:                                              ; preds = %246
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 0, ptr %25, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  store i32 0, ptr %26, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  store i32 -1, ptr %27, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  store i32 -1, ptr %28, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  store i32 0, ptr %29, align 4, !tbaa !8
  br label %253

253:                                              ; preds = %292, %252
  %254 = load i32, ptr %29, align 4, !tbaa !8
  %255 = icmp slt i32 %254, 2
  br i1 %255, label %257, label %256

256:                                              ; preds = %253
  store i32 28, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %295

257:                                              ; preds = %253
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 0, ptr %30, align 4, !tbaa !8
  br label %258

258:                                              ; preds = %288, %257
  %259 = load i32, ptr %30, align 4, !tbaa !8
  %260 = icmp slt i32 %259, 2
  br i1 %260, label %262, label %261

261:                                              ; preds = %258
  store i32 31, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %291

262:                                              ; preds = %258
  %263 = load i32, ptr %14, align 4, !tbaa !8
  %264 = load i32, ptr %29, align 4, !tbaa !8
  %265 = add nsw i32 %263, %264
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %266
  %268 = load i32, ptr %15, align 4, !tbaa !8
  %269 = load i32, ptr %30, align 4, !tbaa !8
  %270 = add nsw i32 %268, %269
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds [2001 x i32], ptr %267, i64 0, i64 %271
  %273 = load i32, ptr %272, align 4, !tbaa !8
  %274 = icmp eq i32 %273, 1
  br i1 %274, label %275, label %278

275:                                              ; preds = %262
  %276 = load i32, ptr %25, align 4, !tbaa !8
  %277 = add nsw i32 %276, 1
  store i32 %277, ptr %25, align 4, !tbaa !8
  br label %287

278:                                              ; preds = %262
  %279 = load i32, ptr %26, align 4, !tbaa !8
  %280 = add nsw i32 %279, 1
  store i32 %280, ptr %26, align 4, !tbaa !8
  %281 = load i32, ptr %14, align 4, !tbaa !8
  %282 = load i32, ptr %29, align 4, !tbaa !8
  %283 = add nsw i32 %281, %282
  store i32 %283, ptr %27, align 4, !tbaa !8
  %284 = load i32, ptr %15, align 4, !tbaa !8
  %285 = load i32, ptr %30, align 4, !tbaa !8
  %286 = add nsw i32 %284, %285
  store i32 %286, ptr %28, align 4, !tbaa !8
  br label %287

287:                                              ; preds = %278, %275
  br label %288

288:                                              ; preds = %287
  %289 = load i32, ptr %30, align 4, !tbaa !8
  %290 = add nsw i32 %289, 1
  store i32 %290, ptr %30, align 4, !tbaa !8
  br label %258, !llvm.loop !25

291:                                              ; preds = %261
  br label %292

292:                                              ; preds = %291
  %293 = load i32, ptr %29, align 4, !tbaa !8
  %294 = add nsw i32 %293, 1
  store i32 %294, ptr %29, align 4, !tbaa !8
  br label %253, !llvm.loop !26

295:                                              ; preds = %256
  %296 = load i32, ptr %26, align 4, !tbaa !8
  %297 = icmp eq i32 %296, 1
  br i1 %297, label %298, label %300

298:                                              ; preds = %295
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %299 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 4 dereferenceable(4) %28)
  store i64 %299, ptr %31, align 4
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @q, ptr noundef nonnull align 4 dereferenceable(8) %31)
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %300

300:                                              ; preds = %298, %295
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %301

301:                                              ; preds = %300, %246
  %302 = load i32, ptr %16, align 4, !tbaa !8
  %303 = sub nsw i32 %302, 1
  %304 = load i32, ptr %17, align 4, !tbaa !8
  %305 = add nsw i32 %304, 1
  %306 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %303, i32 noundef %305)
  br i1 %306, label %307, label %356

307:                                              ; preds = %301
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  store i32 0, ptr %32, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #6
  store i32 0, ptr %33, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #6
  store i32 -1, ptr %34, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #6
  store i32 -1, ptr %35, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #6
  store i32 0, ptr %36, align 4, !tbaa !8
  br label %308

308:                                              ; preds = %347, %307
  %309 = load i32, ptr %36, align 4, !tbaa !8
  %310 = icmp slt i32 %309, 2
  br i1 %310, label %312, label %311

311:                                              ; preds = %308
  store i32 34, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #6
  br label %350

312:                                              ; preds = %308
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #6
  store i32 0, ptr %37, align 4, !tbaa !8
  br label %313

313:                                              ; preds = %343, %312
  %314 = load i32, ptr %37, align 4, !tbaa !8
  %315 = icmp slt i32 %314, 2
  br i1 %315, label %317, label %316

316:                                              ; preds = %313
  store i32 37, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #6
  br label %346

317:                                              ; preds = %313
  %318 = load i32, ptr %14, align 4, !tbaa !8
  %319 = load i32, ptr %36, align 4, !tbaa !8
  %320 = sub nsw i32 %318, %319
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %321
  %323 = load i32, ptr %15, align 4, !tbaa !8
  %324 = load i32, ptr %37, align 4, !tbaa !8
  %325 = add nsw i32 %323, %324
  %326 = sext i32 %325 to i64
  %327 = getelementptr inbounds [2001 x i32], ptr %322, i64 0, i64 %326
  %328 = load i32, ptr %327, align 4, !tbaa !8
  %329 = icmp eq i32 %328, 1
  br i1 %329, label %330, label %333

330:                                              ; preds = %317
  %331 = load i32, ptr %32, align 4, !tbaa !8
  %332 = add nsw i32 %331, 1
  store i32 %332, ptr %32, align 4, !tbaa !8
  br label %342

333:                                              ; preds = %317
  %334 = load i32, ptr %33, align 4, !tbaa !8
  %335 = add nsw i32 %334, 1
  store i32 %335, ptr %33, align 4, !tbaa !8
  %336 = load i32, ptr %14, align 4, !tbaa !8
  %337 = load i32, ptr %36, align 4, !tbaa !8
  %338 = sub nsw i32 %336, %337
  store i32 %338, ptr %34, align 4, !tbaa !8
  %339 = load i32, ptr %15, align 4, !tbaa !8
  %340 = load i32, ptr %37, align 4, !tbaa !8
  %341 = add nsw i32 %339, %340
  store i32 %341, ptr %35, align 4, !tbaa !8
  br label %342

342:                                              ; preds = %333, %330
  br label %343

343:                                              ; preds = %342
  %344 = load i32, ptr %37, align 4, !tbaa !8
  %345 = add nsw i32 %344, 1
  store i32 %345, ptr %37, align 4, !tbaa !8
  br label %313, !llvm.loop !27

346:                                              ; preds = %316
  br label %347

347:                                              ; preds = %346
  %348 = load i32, ptr %36, align 4, !tbaa !8
  %349 = add nsw i32 %348, 1
  store i32 %349, ptr %36, align 4, !tbaa !8
  br label %308, !llvm.loop !28

350:                                              ; preds = %311
  %351 = load i32, ptr %33, align 4, !tbaa !8
  %352 = icmp eq i32 %351, 1
  br i1 %352, label %353, label %355

353:                                              ; preds = %350
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #6
  %354 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %34, ptr noundef nonnull align 4 dereferenceable(4) %35)
  store i64 %354, ptr %38, align 4
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @q, ptr noundef nonnull align 4 dereferenceable(8) %38)
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #6
  br label %355

355:                                              ; preds = %353, %350
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  br label %356

356:                                              ; preds = %355, %301
  %357 = load i32, ptr %16, align 4, !tbaa !8
  %358 = add nsw i32 %357, 1
  %359 = load i32, ptr %17, align 4, !tbaa !8
  %360 = sub nsw i32 %359, 1
  %361 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %358, i32 noundef %360)
  br i1 %361, label %362, label %411

362:                                              ; preds = %356
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #6
  store i32 0, ptr %39, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #6
  store i32 0, ptr %40, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #6
  store i32 -1, ptr %41, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #6
  store i32 -1, ptr %42, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #6
  store i32 0, ptr %43, align 4, !tbaa !8
  br label %363

363:                                              ; preds = %402, %362
  %364 = load i32, ptr %43, align 4, !tbaa !8
  %365 = icmp slt i32 %364, 2
  br i1 %365, label %367, label %366

366:                                              ; preds = %363
  store i32 40, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #6
  br label %405

367:                                              ; preds = %363
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #6
  store i32 0, ptr %44, align 4, !tbaa !8
  br label %368

368:                                              ; preds = %398, %367
  %369 = load i32, ptr %44, align 4, !tbaa !8
  %370 = icmp slt i32 %369, 2
  br i1 %370, label %372, label %371

371:                                              ; preds = %368
  store i32 43, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #6
  br label %401

372:                                              ; preds = %368
  %373 = load i32, ptr %14, align 4, !tbaa !8
  %374 = load i32, ptr %43, align 4, !tbaa !8
  %375 = add nsw i32 %373, %374
  %376 = sext i32 %375 to i64
  %377 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %376
  %378 = load i32, ptr %15, align 4, !tbaa !8
  %379 = load i32, ptr %44, align 4, !tbaa !8
  %380 = sub nsw i32 %378, %379
  %381 = sext i32 %380 to i64
  %382 = getelementptr inbounds [2001 x i32], ptr %377, i64 0, i64 %381
  %383 = load i32, ptr %382, align 4, !tbaa !8
  %384 = icmp eq i32 %383, 1
  br i1 %384, label %385, label %388

385:                                              ; preds = %372
  %386 = load i32, ptr %39, align 4, !tbaa !8
  %387 = add nsw i32 %386, 1
  store i32 %387, ptr %39, align 4, !tbaa !8
  br label %397

388:                                              ; preds = %372
  %389 = load i32, ptr %40, align 4, !tbaa !8
  %390 = add nsw i32 %389, 1
  store i32 %390, ptr %40, align 4, !tbaa !8
  %391 = load i32, ptr %14, align 4, !tbaa !8
  %392 = load i32, ptr %43, align 4, !tbaa !8
  %393 = add nsw i32 %391, %392
  store i32 %393, ptr %41, align 4, !tbaa !8
  %394 = load i32, ptr %15, align 4, !tbaa !8
  %395 = load i32, ptr %44, align 4, !tbaa !8
  %396 = sub nsw i32 %394, %395
  store i32 %396, ptr %42, align 4, !tbaa !8
  br label %397

397:                                              ; preds = %388, %385
  br label %398

398:                                              ; preds = %397
  %399 = load i32, ptr %44, align 4, !tbaa !8
  %400 = add nsw i32 %399, 1
  store i32 %400, ptr %44, align 4, !tbaa !8
  br label %368, !llvm.loop !29

401:                                              ; preds = %371
  br label %402

402:                                              ; preds = %401
  %403 = load i32, ptr %43, align 4, !tbaa !8
  %404 = add nsw i32 %403, 1
  store i32 %404, ptr %43, align 4, !tbaa !8
  br label %363, !llvm.loop !30

405:                                              ; preds = %366
  %406 = load i32, ptr %40, align 4, !tbaa !8
  %407 = icmp eq i32 %406, 1
  br i1 %407, label %408, label %410

408:                                              ; preds = %405
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #6
  %409 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %41, ptr noundef nonnull align 4 dereferenceable(4) %42)
  store i64 %409, ptr %45, align 4
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @q, ptr noundef nonnull align 4 dereferenceable(8) %45)
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #6
  br label %410

410:                                              ; preds = %408, %405
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #6
  br label %411

411:                                              ; preds = %410, %356
  store i32 0, ptr %3, align 4
  br label %412

412:                                              ; preds = %411, %184
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  %413 = load i32, ptr %3, align 4
  switch i32 %413, label %450 [
    i32 0, label %414
    i32 20, label %164
  ]

414:                                              ; preds = %412
  br label %164, !llvm.loop !22

415:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #6
  store i32 1, ptr %46, align 4, !tbaa !8
  br label %416

416:                                              ; preds = %446, %415
  %417 = load i32, ptr %46, align 4, !tbaa !8
  %418 = load i32, ptr @n, align 4, !tbaa !8
  %419 = icmp sle i32 %417, %418
  br i1 %419, label %421, label %420

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

421:                                              ; preds = %416
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #6
  store i32 1, ptr %47, align 4, !tbaa !8
  br label %422

422:                                              ; preds = %441, %421
  %423 = load i32, ptr %47, align 4, !tbaa !8
  %424 = load i32, ptr @m, align 4, !tbaa !8
  %425 = icmp sle i32 %423, %424
  br i1 %425, label %427, label %426

426:                                              ; preds = %422
  store i32 49, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #6
  br label %444

427:                                              ; preds = %422
  %428 = load i32, ptr %46, align 4, !tbaa !8
  %429 = sext i32 %428 to i64
  %430 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %429
  %431 = load i32, ptr %47, align 4, !tbaa !8
  %432 = sext i32 %431 to i64
  %433 = getelementptr inbounds [2001 x i32], ptr %430, i64 0, i64 %432
  %434 = load i32, ptr %433, align 4, !tbaa !8
  %435 = icmp ne i32 %434, 0
  br i1 %435, label %436, label %438

436:                                              ; preds = %427
  %437 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %440

438:                                              ; preds = %427
  %439 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  br label %440

440:                                              ; preds = %438, %436
  br label %441

441:                                              ; preds = %440
  %442 = load i32, ptr %47, align 4, !tbaa !8
  %443 = add nsw i32 %442, 1
  store i32 %443, ptr %47, align 4, !tbaa !8
  br label %422, !llvm.loop !31

444:                                              ; preds = %426
  %445 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
  br label %446

446:                                              ; preds = %444
  %447 = load i32, ptr %46, align 4, !tbaa !8
  %448 = add nsw i32 %447, 1
  store i32 %448, ptr %46, align 4, !tbaa !8
  br label %416, !llvm.loop !32

449:                                              ; preds = %420
  ret i32 0

450:                                              ; preds = %412
  unreachable
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #2

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

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #2

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!10, !10, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = !{!20, !9, i64 0}
!20 = !{!"_ZTSSt4pairIiiE", !9, i64 0, !9, i64 4}
!21 = !{!20, !9, i64 4}
!22 = distinct !{!22, !13}
!23 = distinct !{!23, !13}
!24 = distinct !{!24, !13}
!25 = distinct !{!25, !13}
!26 = distinct !{!26, !13}
!27 = distinct !{!27, !13}
!28 = distinct !{!28, !13}
!29 = distinct !{!29, !13}
!30 = distinct !{!30, !13}
!31 = distinct !{!31, !13}
!32 = distinct !{!32, !13}


; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::pair" = type { i32, i32 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@g = external dso_local local_unnamed_addr global [2001 x [2001 x i32]], align 16
@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@q = external dso_local global %"class.std::queue", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z7inrangeii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::pair", align 8
  %16 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %17 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %18 = getelementptr i8, ptr %17, i64 -24
  %19 = load i64, ptr %18, align 8
  %20 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %19
  %21 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %20, ptr noundef null)
  %22 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %24
  %26 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %25, ptr noundef null)
  %27 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %28 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %29 = load i32, ptr @n, align 4, !tbaa !8
  %.not166 = icmp slt i32 %29, 1
  br i1 %.not166, label %.preheader160, label %.lr.ph169

.preheader163:                                    ; preds = %._crit_edge
  %.not149180 = icmp slt i32 %34, 2
  %30 = load i32, ptr @m, align 4
  %31 = icmp slt i32 %30, 2
  %or.cond = select i1 %.not149180, i1 true, i1 %31
  br i1 %or.cond, label %.preheader160, label %.preheader162

.lr.ph169:                                        ; preds = %0, %._crit_edge
  %indvars.iv216 = phi i64 [ %indvars.iv.next217, %._crit_edge ], [ 1, %0 ]
  %32 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  %33 = load i32, ptr @m, align 4, !tbaa !8
  %.not154164 = icmp slt i32 %33, 1
  br i1 %.not154164, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph169
  %indvars.iv.next217 = add nuw nsw i64 %indvars.iv216, 1
  %34 = load i32, ptr @n, align 4, !tbaa !8
  %35 = sext i32 %34 to i64
  %.not.not = icmp slt i64 %indvars.iv216, %35
  br i1 %.not.not, label %.lr.ph169, label %.preheader163, !llvm.loop !11

.lr.ph:                                           ; preds = %.lr.ph169, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.lr.ph169 ]
  %36 = add nsw i64 %indvars.iv, -1
  %37 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %36)
  %38 = load i8, ptr %37, align 1, !tbaa !13
  %39 = icmp eq i8 %38, 46
  %40 = zext i1 %39 to i32
  %41 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %indvars.iv216, i64 %indvars.iv
  store i32 %40, ptr %41, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %42 = load i32, ptr @m, align 4, !tbaa !8
  %43 = sext i32 %42 to i64
  %.not154.not = icmp slt i64 %indvars.iv, %43
  br i1 %.not154.not, label %.lr.ph, label %._crit_edge, !llvm.loop !14

.preheader162:                                    ; preds = %.preheader163, %._crit_edge179
  %44 = phi i32 [ %53, %._crit_edge179 ], [ %34, %.preheader163 ]
  %45 = phi i32 [ %54, %._crit_edge179 ], [ %30, %.preheader163 ]
  %46 = phi i32 [ %55, %._crit_edge179 ], [ %30, %.preheader163 ]
  %indvars.iv230 = phi i64 [ %indvars.iv.next231, %._crit_edge179 ], [ 2, %.preheader163 ]
  %.not153176 = icmp slt i32 %46, 2
  br i1 %.not153176, label %._crit_edge179, label %.lr.ph178.preheader

.lr.ph178.preheader:                              ; preds = %.preheader162
  %47 = trunc nuw nsw i64 %indvars.iv230 to i32
  %48 = trunc nuw nsw i64 %indvars.iv230 to i32
  %49 = add nsw i64 %indvars.iv230, -1
  %50 = trunc nuw nsw i64 %49 to i32
  %51 = trunc nuw nsw i64 %49 to i32
  br label %.lr.ph178

.preheader160:                                    ; preds = %._crit_edge179, %0, %.preheader163
  %52 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @q)
  br i1 %52, label %.preheader155, label %.lr.ph206

._crit_edge179.loopexit:                          ; preds = %88
  %.pre271 = load i32, ptr @n, align 4, !tbaa !8
  br label %._crit_edge179

._crit_edge179:                                   ; preds = %._crit_edge179.loopexit, %.preheader162
  %53 = phi i32 [ %.pre271, %._crit_edge179.loopexit ], [ %44, %.preheader162 ]
  %54 = phi i32 [ %89, %._crit_edge179.loopexit ], [ %45, %.preheader162 ]
  %55 = phi i32 [ %89, %._crit_edge179.loopexit ], [ %46, %.preheader162 ]
  %indvars.iv.next231 = add nuw nsw i64 %indvars.iv230, 1
  %56 = sext i32 %53 to i64
  %.not149.not = icmp slt i64 %indvars.iv230, %56
  br i1 %.not149.not, label %.preheader162, label %.preheader160, !llvm.loop !15

.lr.ph178:                                        ; preds = %.lr.ph178.preheader, %88
  %57 = phi i32 [ %45, %.lr.ph178.preheader ], [ %89, %88 ]
  %indvars.iv227 = phi i64 [ 2, %.lr.ph178.preheader ], [ %indvars.iv.next228, %88 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  store i32 -1, ptr %1, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 -1, ptr %2, align 4, !tbaa !8
  %58 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %indvars.iv230, i64 %indvars.iv227
  %59 = load i32, ptr %58, align 4, !tbaa !8
  %60 = icmp eq i32 %59, 1
  br i1 %60, label %63, label %61

61:                                               ; preds = %.lr.ph178
  store i32 %47, ptr %1, align 4, !tbaa !8
  %62 = trunc nuw nsw i64 %indvars.iv227 to i32
  store i32 %62, ptr %2, align 4, !tbaa !8
  br label %63

63:                                               ; preds = %.lr.ph178, %61
  %.2144 = phi i32 [ 1, %61 ], [ 0, %.lr.ph178 ]
  %64 = add nsw i64 %indvars.iv227, -1
  %65 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %indvars.iv230, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !8
  %67 = icmp eq i32 %66, 1
  br i1 %67, label %.preheader161.1, label %68

68:                                               ; preds = %63
  %69 = add nuw nsw i32 %.2144, 1
  store i32 %48, ptr %1, align 4, !tbaa !8
  %70 = trunc nuw nsw i64 %64 to i32
  store i32 %70, ptr %2, align 4, !tbaa !8
  br label %.preheader161.1

.preheader161.1:                                  ; preds = %63, %68
  %.2144.1 = phi i32 [ %69, %68 ], [ %.2144, %63 ]
  %71 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %49, i64 %indvars.iv227
  %72 = load i32, ptr %71, align 4, !tbaa !8
  %73 = icmp eq i32 %72, 1
  br i1 %73, label %77, label %74

74:                                               ; preds = %.preheader161.1
  %75 = add nuw nsw i32 %.2144.1, 1
  store i32 %50, ptr %1, align 4, !tbaa !8
  %76 = trunc nuw nsw i64 %indvars.iv227 to i32
  store i32 %76, ptr %2, align 4, !tbaa !8
  br label %77

77:                                               ; preds = %.preheader161.1, %74
  %.2144.1226 = phi i32 [ %75, %74 ], [ %.2144.1, %.preheader161.1 ]
  %78 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %49, i64 %64
  %79 = load i32, ptr %78, align 4, !tbaa !8
  %80 = icmp eq i32 %79, 1
  br i1 %80, label %84, label %81

81:                                               ; preds = %77
  %82 = add nuw nsw i32 %.2144.1226, 1
  store i32 %51, ptr %1, align 4, !tbaa !8
  %83 = trunc nuw nsw i64 %64 to i32
  store i32 %83, ptr %2, align 4, !tbaa !8
  br label %84

84:                                               ; preds = %77, %81
  %.2144.1.1 = phi i32 [ %82, %81 ], [ %.2144.1226, %77 ]
  %85 = icmp eq i32 %.2144.1.1, 1
  br i1 %85, label %86, label %88

86:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %87 = 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 %87, ptr %3, align 8
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @q, ptr noundef nonnull align 4 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  %.pre = load i32, ptr @m, align 4, !tbaa !8
  br label %88

88:                                               ; preds = %86, %84
  %89 = phi i32 [ %.pre, %86 ], [ %57, %84 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %indvars.iv.next228 = add nuw nsw i64 %indvars.iv227, 1
  %90 = sext i32 %89 to i64
  %.not153.not = icmp slt i64 %indvars.iv227, %90
  br i1 %.not153.not, label %.lr.ph178, label %._crit_edge179.loopexit, !llvm.loop !17

.preheader155:                                    ; preds = %238, %.preheader160
  %91 = load i32, ptr @n, align 4, !tbaa !8
  %.not150211 = icmp slt i32 %91, 1
  br i1 %.not150211, label %._crit_edge213, label %.preheader

.lr.ph206:                                        ; preds = %.preheader160, %238
  %92 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) @q)
  %93 = load i32, ptr %92, align 4, !tbaa !18
  %94 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) @q)
  %95 = getelementptr inbounds i8, ptr %94, i64 4
  %96 = load i32, ptr %95, align 4, !tbaa !20
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) @q)
  %97 = sext i32 %93 to i64
  %98 = sext i32 %96 to i64
  %99 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %97, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !8
  %101 = icmp eq i32 %100, 1
  br i1 %101, label %238, label %102, !llvm.loop !21

102:                                              ; preds = %.lr.ph206
  store i32 1, ptr %99, align 4, !tbaa !8
  %103 = add nsw i32 %93, -1
  %104 = add nsw i32 %96, -1
  %105 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %103, i32 noundef %104)
  br i1 %105, label %.preheader159, label %137

.preheader159:                                    ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  store i32 -1, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  store i32 -1, ptr %5, align 4, !tbaa !8
  %106 = load i32, ptr %99, align 4, !tbaa !8
  %107 = icmp eq i32 %106, 1
  br i1 %107, label %109, label %108

108:                                              ; preds = %.preheader159
  store i32 %93, ptr %4, align 4, !tbaa !8
  store i32 %96, ptr %5, align 4, !tbaa !8
  br label %109

109:                                              ; preds = %.preheader159, %108
  %.2133 = phi i32 [ 1, %108 ], [ 0, %.preheader159 ]
  %110 = add nsw i64 %98, -1
  %111 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %97, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !8
  %113 = icmp eq i32 %112, 1
  br i1 %113, label %.preheader159.1, label %114

114:                                              ; preds = %109
  %115 = add nuw nsw i32 %.2133, 1
  store i32 %93, ptr %4, align 4, !tbaa !8
  %116 = trunc nsw i64 %110 to i32
  store i32 %116, ptr %5, align 4, !tbaa !8
  br label %.preheader159.1

.preheader159.1:                                  ; preds = %109, %114
  %.2133.1 = phi i32 [ %115, %114 ], [ %.2133, %109 ]
  %117 = add nsw i64 %97, -1
  %118 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %117, i64 %98
  %119 = load i32, ptr %118, align 4, !tbaa !8
  %120 = icmp eq i32 %119, 1
  br i1 %120, label %124, label %121

121:                                              ; preds = %.preheader159.1
  %122 = add nuw nsw i32 %.2133.1, 1
  %123 = trunc nsw i64 %117 to i32
  store i32 %123, ptr %4, align 4, !tbaa !8
  store i32 %96, ptr %5, align 4, !tbaa !8
  br label %124

124:                                              ; preds = %.preheader159.1, %121
  %.2133.1240 = phi i32 [ %122, %121 ], [ %.2133.1, %.preheader159.1 ]
  %125 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %117, i64 %110
  %126 = load i32, ptr %125, align 4, !tbaa !8
  %127 = icmp eq i32 %126, 1
  br i1 %127, label %132, label %128

128:                                              ; preds = %124
  %129 = add nuw nsw i32 %.2133.1240, 1
  %130 = trunc nsw i64 %117 to i32
  store i32 %130, ptr %4, align 4, !tbaa !8
  %131 = trunc nsw i64 %110 to i32
  store i32 %131, ptr %5, align 4, !tbaa !8
  br label %132

132:                                              ; preds = %124, %128
  %.2133.1.1 = phi i32 [ %129, %128 ], [ %.2133.1240, %124 ]
  %133 = icmp eq i32 %.2133.1.1, 1
  br i1 %133, label %134, label %136

134:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %135 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %135, ptr %6, align 8
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @q, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %136

136:                                              ; preds = %134, %132
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  br label %137

137:                                              ; preds = %136, %102
  %138 = add nsw i32 %93, 1
  %139 = add nsw i32 %96, 1
  %140 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %138, i32 noundef %139)
  br i1 %140, label %.preheader158, label %172

.preheader158:                                    ; preds = %137
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 -1, ptr %7, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  store i32 -1, ptr %8, align 4, !tbaa !8
  %141 = load i32, ptr %99, align 4, !tbaa !8
  %142 = icmp eq i32 %141, 1
  br i1 %142, label %144, label %143

143:                                              ; preds = %.preheader158
  store i32 %93, ptr %7, align 4, !tbaa !8
  store i32 %96, ptr %8, align 4, !tbaa !8
  br label %144

144:                                              ; preds = %.preheader158, %143
  %.2125 = phi i32 [ 1, %143 ], [ 0, %.preheader158 ]
  %145 = add nsw i64 %98, 1
  %146 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %97, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !8
  %148 = icmp eq i32 %147, 1
  br i1 %148, label %.preheader158.1, label %149

149:                                              ; preds = %144
  %150 = add nuw nsw i32 %.2125, 1
  store i32 %93, ptr %7, align 4, !tbaa !8
  %151 = trunc nsw i64 %145 to i32
  store i32 %151, ptr %8, align 4, !tbaa !8
  br label %.preheader158.1

.preheader158.1:                                  ; preds = %144, %149
  %.2125.1 = phi i32 [ %150, %149 ], [ %.2125, %144 ]
  %152 = add nsw i64 %97, 1
  %153 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %152, i64 %98
  %154 = load i32, ptr %153, align 4, !tbaa !8
  %155 = icmp eq i32 %154, 1
  br i1 %155, label %159, label %156

156:                                              ; preds = %.preheader158.1
  %157 = add nuw nsw i32 %.2125.1, 1
  %158 = trunc nsw i64 %152 to i32
  store i32 %158, ptr %7, align 4, !tbaa !8
  store i32 %96, ptr %8, align 4, !tbaa !8
  br label %159

159:                                              ; preds = %.preheader158.1, %156
  %.2125.1248 = phi i32 [ %157, %156 ], [ %.2125.1, %.preheader158.1 ]
  %160 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %152, i64 %145
  %161 = load i32, ptr %160, align 4, !tbaa !8
  %162 = icmp eq i32 %161, 1
  br i1 %162, label %167, label %163

163:                                              ; preds = %159
  %164 = add nuw nsw i32 %.2125.1248, 1
  %165 = trunc nsw i64 %152 to i32
  store i32 %165, ptr %7, align 4, !tbaa !8
  %166 = trunc nsw i64 %145 to i32
  store i32 %166, ptr %8, align 4, !tbaa !8
  br label %167

167:                                              ; preds = %159, %163
  %.2125.1.1 = phi i32 [ %164, %163 ], [ %.2125.1248, %159 ]
  %168 = icmp eq i32 %.2125.1.1, 1
  br i1 %168, label %169, label %171

169:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %170 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__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) %8)
  store i64 %170, ptr %9, align 8
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @q, ptr noundef nonnull align 4 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %171

171:                                              ; preds = %169, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  br label %172

172:                                              ; preds = %171, %137
  %173 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %103, i32 noundef %139)
  br i1 %173, label %.preheader157, label %205

.preheader157:                                    ; preds = %172
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  store i32 -1, ptr %10, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  store i32 -1, ptr %11, align 4, !tbaa !8
  %174 = load i32, ptr %99, align 4, !tbaa !8
  %175 = icmp eq i32 %174, 1
  br i1 %175, label %177, label %176

176:                                              ; preds = %.preheader157
  store i32 %93, ptr %10, align 4, !tbaa !8
  store i32 %96, ptr %11, align 4, !tbaa !8
  br label %177

177:                                              ; preds = %.preheader157, %176
  %.2117 = phi i32 [ 1, %176 ], [ 0, %.preheader157 ]
  %178 = add nsw i64 %98, 1
  %179 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %97, i64 %178
  %180 = load i32, ptr %179, align 4, !tbaa !8
  %181 = icmp eq i32 %180, 1
  br i1 %181, label %.preheader157.1, label %182

182:                                              ; preds = %177
  %183 = add nuw nsw i32 %.2117, 1
  store i32 %93, ptr %10, align 4, !tbaa !8
  %184 = trunc nsw i64 %178 to i32
  store i32 %184, ptr %11, align 4, !tbaa !8
  br label %.preheader157.1

.preheader157.1:                                  ; preds = %177, %182
  %.2117.1 = phi i32 [ %183, %182 ], [ %.2117, %177 ]
  %185 = add nsw i64 %97, -1
  %186 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %185, i64 %98
  %187 = load i32, ptr %186, align 4, !tbaa !8
  %188 = icmp eq i32 %187, 1
  br i1 %188, label %192, label %189

189:                                              ; preds = %.preheader157.1
  %190 = add nuw nsw i32 %.2117.1, 1
  %191 = trunc nsw i64 %185 to i32
  store i32 %191, ptr %10, align 4, !tbaa !8
  store i32 %96, ptr %11, align 4, !tbaa !8
  br label %192

192:                                              ; preds = %.preheader157.1, %189
  %.2117.1256 = phi i32 [ %190, %189 ], [ %.2117.1, %.preheader157.1 ]
  %193 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %185, i64 %178
  %194 = load i32, ptr %193, align 4, !tbaa !8
  %195 = icmp eq i32 %194, 1
  br i1 %195, label %200, label %196

196:                                              ; preds = %192
  %197 = add nuw nsw i32 %.2117.1256, 1
  %198 = trunc nsw i64 %185 to i32
  store i32 %198, ptr %10, align 4, !tbaa !8
  %199 = trunc nsw i64 %178 to i32
  store i32 %199, ptr %11, align 4, !tbaa !8
  br label %200

200:                                              ; preds = %192, %196
  %.2117.1.1 = phi i32 [ %197, %196 ], [ %.2117.1256, %192 ]
  %201 = icmp eq i32 %.2117.1.1, 1
  br i1 %201, label %202, label %204

202:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %203 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  store i64 %203, ptr %12, align 8
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @q, ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  br label %204

204:                                              ; preds = %202, %200
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  br label %205

205:                                              ; preds = %204, %172
  %206 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %138, i32 noundef %104)
  br i1 %206, label %.preheader156, label %238

.preheader156:                                    ; preds = %205
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #6
  store i32 -1, ptr %13, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #6
  store i32 -1, ptr %14, align 4, !tbaa !8
  %207 = load i32, ptr %99, align 4, !tbaa !8
  %208 = icmp eq i32 %207, 1
  br i1 %208, label %210, label %209

209:                                              ; preds = %.preheader156
  store i32 %93, ptr %13, align 4, !tbaa !8
  store i32 %96, ptr %14, align 4, !tbaa !8
  br label %210

210:                                              ; preds = %.preheader156, %209
  %.2 = phi i32 [ 1, %209 ], [ 0, %.preheader156 ]
  %211 = add nsw i64 %98, -1
  %212 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %97, i64 %211
  %213 = load i32, ptr %212, align 4, !tbaa !8
  %214 = icmp eq i32 %213, 1
  br i1 %214, label %.preheader156.1, label %215

215:                                              ; preds = %210
  %216 = add nuw nsw i32 %.2, 1
  store i32 %93, ptr %13, align 4, !tbaa !8
  %217 = trunc nsw i64 %211 to i32
  store i32 %217, ptr %14, align 4, !tbaa !8
  br label %.preheader156.1

.preheader156.1:                                  ; preds = %210, %215
  %.2.1 = phi i32 [ %216, %215 ], [ %.2, %210 ]
  %218 = add nsw i64 %97, 1
  %219 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %218, i64 %98
  %220 = load i32, ptr %219, align 4, !tbaa !8
  %221 = icmp eq i32 %220, 1
  br i1 %221, label %225, label %222

222:                                              ; preds = %.preheader156.1
  %223 = add nuw nsw i32 %.2.1, 1
  %224 = trunc nsw i64 %218 to i32
  store i32 %224, ptr %13, align 4, !tbaa !8
  store i32 %96, ptr %14, align 4, !tbaa !8
  br label %225

225:                                              ; preds = %.preheader156.1, %222
  %.2.1264 = phi i32 [ %223, %222 ], [ %.2.1, %.preheader156.1 ]
  %226 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %218, i64 %211
  %227 = load i32, ptr %226, align 4, !tbaa !8
  %228 = icmp eq i32 %227, 1
  br i1 %228, label %233, label %229

229:                                              ; preds = %225
  %230 = add nuw nsw i32 %.2.1264, 1
  %231 = trunc nsw i64 %218 to i32
  store i32 %231, ptr %13, align 4, !tbaa !8
  %232 = trunc nsw i64 %211 to i32
  store i32 %232, ptr %14, align 4, !tbaa !8
  br label %233

233:                                              ; preds = %225, %229
  %.2.1.1 = phi i32 [ %230, %229 ], [ %.2.1264, %225 ]
  %234 = icmp eq i32 %.2.1.1, 1
  br i1 %234, label %235, label %237

235:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #6
  %236 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
  store i64 %236, ptr %15, align 8
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @q, ptr noundef nonnull align 4 dereferenceable(8) %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  br label %237

237:                                              ; preds = %235, %233
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  br label %238

238:                                              ; preds = %205, %237, %.lr.ph206
  %239 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @q)
  br i1 %239, label %.preheader155, label %.lr.ph206

.preheader:                                       ; preds = %.preheader155, %._crit_edge210
  %indvars.iv268 = phi i64 [ %indvars.iv.next269, %._crit_edge210 ], [ 1, %.preheader155 ]
  %240 = load i32, ptr @m, align 4, !tbaa !8
  %.not151207 = icmp slt i32 %240, 1
  br i1 %.not151207, label %._crit_edge210, label %.lr.ph209

._crit_edge213:                                   ; preds = %._crit_edge210, %.preheader155
  ret i32 0

._crit_edge210:                                   ; preds = %.lr.ph209, %.preheader
  %241 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.4)
  %indvars.iv.next269 = add nuw nsw i64 %indvars.iv268, 1
  %242 = load i32, ptr @n, align 4, !tbaa !8
  %243 = sext i32 %242 to i64
  %.not150.not = icmp slt i64 %indvars.iv268, %243
  br i1 %.not150.not, label %.preheader, label %._crit_edge213, !llvm.loop !22

.lr.ph209:                                        ; preds = %.preheader, %.lr.ph209
  %indvars.iv265 = phi i64 [ %indvars.iv.next266, %.lr.ph209 ], [ 1, %.preheader ]
  %244 = getelementptr inbounds [2001 x [2001 x i32]], ptr @g, i64 0, i64 %indvars.iv268, i64 %indvars.iv265
  %245 = load i32, ptr %244, align 4, !tbaa !8
  %.not152 = icmp eq i32 %245, 0
  %.str.3..str = select i1 %.not152, ptr @.str.3, ptr @.str
  %246 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %.str.3..str)
  %indvars.iv.next266 = add nuw nsw i64 %indvars.iv265, 1
  %247 = load i32, ptr @m, align 4, !tbaa !8
  %248 = sext i32 %247 to i64
  %.not151.not = icmp slt i64 %indvars.iv265, %248
  br i1 %.not151.not, label %.lr.ph209, label %._crit_edge210, !llvm.loop !23
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #2

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

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

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

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

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

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

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

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

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

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

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


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