; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/WF/Easy Medium/CHEFIHG/A.ll (Z3bfsii)

; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"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 }
%"struct.std::pair" = type { i32, i32 }

@dx = external dso_local global [4 x i32], align 16
@dy = external dso_local global [4 x i32], align 16
@_Z3resB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@vis = external dso_local global [21 x [21 x i32]], align 16
@pre = external dso_local global [21 x [21 x [2 x i32]]], align 16
@type = external dso_local global [21 x [21 x i32]], align 16
@Dx = external dso_local global i32, align 4
@Dy = external dso_local global i32, align 4

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3bfsii(i32 noundef %0, i32 noundef %1) #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca i8, align 1
  %9 = alloca %"class.std::queue", align 8
  %10 = alloca %"struct.std::pair", align 4
  %11 = alloca ptr, align 8
  %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 %"struct.std::pair", align 4
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store ptr @_Z3resB5cxx11, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %26 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z3resB5cxx11) #7
  %27 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %26, ptr %27, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %28 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z3resB5cxx11) #7
  %29 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %28, ptr %29, align 8
  br label %30

30:                                               ; preds = %84, %2
  %31 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %31, label %33, label %32

32:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %86

33:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  %34 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %35 = load i8, ptr %34, align 1, !tbaa !11
  store i8 %35, ptr %8, align 1, !tbaa !11
  %36 = load i8, ptr %8, align 1, !tbaa !11
  %37 = sext i8 %36 to i32
  %38 = icmp eq i32 %37, 76
  br i1 %38, label %39, label %47

39:                                               ; preds = %33
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = sub nsw i32 %41, 1
  %43 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %40, i32 noundef %42)
  br i1 %43, label %44, label %47

44:                                               ; preds = %39
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = add nsw i32 %45, -1
  store i32 %46, ptr %4, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %44, %39, %33
  %48 = load i8, ptr %8, align 1, !tbaa !11
  %49 = sext i8 %48 to i32
  %50 = icmp eq i32 %49, 82
  br i1 %50, label %51, label %59

51:                                               ; preds = %47
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  %55 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %52, i32 noundef %54)
  br i1 %55, label %56, label %59

56:                                               ; preds = %51
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %4, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %56, %51, %47
  %60 = load i8, ptr %8, align 1, !tbaa !11
  %61 = sext i8 %60 to i32
  %62 = icmp eq i32 %61, 85
  br i1 %62, label %63, label %71

63:                                               ; preds = %59
  %64 = load i32, ptr %3, align 4, !tbaa !5
  %65 = sub nsw i32 %64, 1
  %66 = load i32, ptr %4, align 4, !tbaa !5
  %67 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %65, i32 noundef %66)
  br i1 %67, label %68, label %71

68:                                               ; preds = %63
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = add nsw i32 %69, -1
  store i32 %70, ptr %3, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %68, %63, %59
  %72 = load i8, ptr %8, align 1, !tbaa !11
  %73 = sext i8 %72 to i32
  %74 = icmp eq i32 %73, 68
  br i1 %74, label %75, label %83

75:                                               ; preds = %71
  %76 = load i32, ptr %3, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  %78 = load i32, ptr %4, align 4, !tbaa !5
  %79 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %77, i32 noundef %78)
  br i1 %79, label %80, label %83

80:                                               ; preds = %75
  %81 = load i32, ptr %3, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %3, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %80, %75, %71
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  br label %84

84:                                               ; preds = %83
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br label %30

86:                                               ; preds = %32
  call void @llvm.memset.p0.i64(ptr align 16 @vis, i8 0, i64 1764, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @pre, i8 -1, i64 3528, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @type, i8 -1, i64 1764, i1 false)
  call void @llvm.lifetime.start.p0(i64 80, ptr %9) #7
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %87 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %88 unwind label %110

88:                                               ; preds = %86
  store i64 %87, ptr %10, align 4
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %9, ptr noundef nonnull align 4 dereferenceable(8) %10)
          to label %89 unwind label %110

89:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %90

90:                                               ; preds = %219, %217, %89
  %91 = invoke noundef zeroext i1 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
          to label %92 unwind label %114

92:                                               ; preds = %90
  %93 = xor i1 %91, true
  br i1 %93, label %94, label %221

94:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %95 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
          to label %96 unwind label %118

96:                                               ; preds = %94
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %95, i64 8, i1 false)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
          to label %97 unwind label %118

97:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %98 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 0
  %99 = load i32, ptr %98, align 4, !tbaa !12
  store i32 %99, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %100 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 1
  %101 = load i32, ptr %100, align 4, !tbaa !14
  store i32 %101, ptr %15, align 4, !tbaa !5
  %102 = load i32, ptr %14, align 4, !tbaa !5
  %103 = load i32, ptr @Dx, align 4, !tbaa !5
  %104 = icmp eq i32 %102, %103
  br i1 %104, label %105, label %122

105:                                              ; preds = %97
  %106 = load i32, ptr %15, align 4, !tbaa !5
  %107 = load i32, ptr @Dy, align 4, !tbaa !5
  %108 = icmp eq i32 %106, %107
  br i1 %108, label %109, label %122

109:                                              ; preds = %105
  store i32 5, ptr %16, align 4
  br label %217

110:                                              ; preds = %88, %86
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %11, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %279

114:                                              ; preds = %90
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %11, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %12, align 4
  br label %279

118:                                              ; preds = %96, %94
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %11, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %12, align 4
  br label %220

122:                                              ; preds = %105, %97
  %123 = load i32, ptr %14, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [21 x [21 x i32]], ptr @vis, i64 0, i64 %124
  %126 = load i32, ptr %15, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [21 x i32], ptr %125, i64 0, i64 %127
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %131, label %132

131:                                              ; preds = %122
  store i32 4, ptr %16, align 4
  br label %217, !llvm.loop !15

132:                                              ; preds = %122
  %133 = load i32, ptr %14, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [21 x [21 x i32]], ptr @vis, i64 0, i64 %134
  %136 = load i32, ptr %15, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [21 x i32], ptr %135, i64 0, i64 %137
  store i32 1, ptr %138, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %139

139:                                              ; preds = %209, %132
  %140 = load i32, ptr %17, align 4, !tbaa !5
  %141 = icmp slt i32 %140, 4
  br i1 %141, label %143, label %142

142:                                              ; preds = %139
  store i32 6, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %216

143:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %144 = load i32, ptr %14, align 4, !tbaa !5
  %145 = load i32, ptr %17, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [4 x i32], ptr @dx, i64 0, i64 %146
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = add nsw i32 %144, %148
  store i32 %149, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %150 = load i32, ptr %15, align 4, !tbaa !5
  %151 = load i32, ptr %17, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [4 x i32], ptr @dy, i64 0, i64 %152
  %154 = load i32, ptr %153, align 4, !tbaa !5
  %155 = add nsw i32 %150, %154
  store i32 %155, ptr %19, align 4, !tbaa !5
  %156 = load i32, ptr %18, align 4, !tbaa !5
  %157 = load i32, ptr %19, align 4, !tbaa !5
  %158 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %156, i32 noundef %157)
  br i1 %158, label %159, label %178

159:                                              ; preds = %143
  %160 = load i32, ptr %18, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [21 x [21 x [2 x i32]]], ptr @pre, i64 0, i64 %161
  %163 = load i32, ptr %19, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [21 x [2 x i32]], ptr %162, i64 0, i64 %164
  %166 = getelementptr inbounds [2 x i32], ptr %165, i64 0, i64 0
  %167 = load i32, ptr %166, align 8, !tbaa !5
  %168 = icmp ne i32 %167, -1
  br i1 %168, label %178, label %169

169:                                              ; preds = %159
  %170 = load i32, ptr %18, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [21 x [21 x i32]], ptr @vis, i64 0, i64 %171
  %173 = load i32, ptr %19, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [21 x i32], ptr %172, i64 0, i64 %174
  %176 = load i32, ptr %175, align 4, !tbaa !5
  %177 = icmp ne i32 %176, 0
  br i1 %177, label %178, label %179

178:                                              ; preds = %169, %159, %143
  store i32 8, ptr %16, align 4
  br label %206

179:                                              ; preds = %169
  %180 = load i32, ptr %14, align 4, !tbaa !5
  %181 = load i32, ptr %18, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [21 x [21 x [2 x i32]]], ptr @pre, i64 0, i64 %182
  %184 = load i32, ptr %19, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [21 x [2 x i32]], ptr %183, i64 0, i64 %185
  %187 = getelementptr inbounds [2 x i32], ptr %186, i64 0, i64 0
  store i32 %180, ptr %187, align 8, !tbaa !5
  %188 = load i32, ptr %15, align 4, !tbaa !5
  %189 = load i32, ptr %18, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [21 x [21 x [2 x i32]]], ptr @pre, i64 0, i64 %190
  %192 = load i32, ptr %19, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [21 x [2 x i32]], ptr %191, i64 0, i64 %193
  %195 = getelementptr inbounds [2 x i32], ptr %194, i64 0, i64 1
  store i32 %188, ptr %195, align 4, !tbaa !5
  %196 = load i32, ptr %17, align 4, !tbaa !5
  %197 = load i32, ptr %18, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [21 x [21 x i32]], ptr @type, i64 0, i64 %198
  %200 = load i32, ptr %19, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [21 x i32], ptr %199, i64 0, i64 %201
  store i32 %196, ptr %202, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %203 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %204 unwind label %212

204:                                              ; preds = %179
  store i64 %203, ptr %20, align 4
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %9, ptr noundef nonnull align 4 dereferenceable(8) %20)
          to label %205 unwind label %212

205:                                              ; preds = %204
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  store i32 0, ptr %16, align 4
  br label %206

206:                                              ; preds = %205, %178
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  %207 = load i32, ptr %16, align 4
  switch i32 %207, label %285 [
    i32 0, label %208
    i32 8, label %209
  ]

208:                                              ; preds = %206
  br label %209

209:                                              ; preds = %208, %206
  %210 = load i32, ptr %17, align 4, !tbaa !5
  %211 = add nsw i32 %210, 1
  store i32 %211, ptr %17, align 4, !tbaa !5
  br label %139, !llvm.loop !17

212:                                              ; preds = %204, %179
  %213 = landingpad { ptr, i32 }
          cleanup
  %214 = extractvalue { ptr, i32 } %213, 0
  store ptr %214, ptr %11, align 8
  %215 = extractvalue { ptr, i32 } %213, 1
  store i32 %215, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %220

216:                                              ; preds = %142
  store i32 0, ptr %16, align 4
  br label %217

217:                                              ; preds = %216, %131, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  %218 = load i32, ptr %16, align 4
  switch i32 %218, label %285 [
    i32 0, label %219
    i32 5, label %221
    i32 4, label %90
  ]

219:                                              ; preds = %217
  br label %90, !llvm.loop !15

220:                                              ; preds = %212, %118
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %279

221:                                              ; preds = %217, %92
  %222 = load i32, ptr @Dx, align 4, !tbaa !5
  store i32 %222, ptr %3, align 4, !tbaa !5
  %223 = load i32, ptr @Dy, align 4, !tbaa !5
  store i32 %223, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  br label %224

224:                                              ; preds = %244, %221
  %225 = load i32, ptr %3, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [21 x [21 x [2 x i32]]], ptr @pre, i64 0, i64 %226
  %228 = load i32, ptr %4, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [21 x [2 x i32]], ptr %227, i64 0, i64 %229
  %231 = getelementptr inbounds [2 x i32], ptr %230, i64 0, i64 0
  %232 = load i32, ptr %231, align 8, !tbaa !5
  %233 = icmp ne i32 %232, -1
  br i1 %233, label %234, label %267

234:                                              ; preds = %224
  %235 = load i32, ptr %3, align 4, !tbaa !5
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [21 x [21 x i32]], ptr @type, i64 0, i64 %236
  %238 = load i32, ptr %4, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [21 x i32], ptr %237, i64 0, i64 %239
  %241 = load i32, ptr %240, align 4, !tbaa !5
  %242 = call noundef signext i8 @_Z4getci(i32 noundef %241)
  %243 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %21, i8 noundef signext %242)
          to label %244 unwind label %263

244:                                              ; preds = %234
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %245 = load i32, ptr %3, align 4, !tbaa !5
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [21 x [21 x [2 x i32]]], ptr @pre, i64 0, i64 %246
  %248 = load i32, ptr %4, align 4, !tbaa !5
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [21 x [2 x i32]], ptr %247, i64 0, i64 %249
  %251 = getelementptr inbounds [2 x i32], ptr %250, i64 0, i64 0
  %252 = load i32, ptr %251, align 8, !tbaa !5
  store i32 %252, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %253 = load i32, ptr %3, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [21 x [21 x [2 x i32]]], ptr @pre, i64 0, i64 %254
  %256 = load i32, ptr %4, align 4, !tbaa !5
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [21 x [2 x i32]], ptr %255, i64 0, i64 %257
  %259 = getelementptr inbounds [2 x i32], ptr %258, i64 0, i64 1
  %260 = load i32, ptr %259, align 4, !tbaa !5
  store i32 %260, ptr %23, align 4, !tbaa !5
  %261 = load i32, ptr %22, align 4, !tbaa !5
  store i32 %261, ptr %3, align 4, !tbaa !5
  %262 = load i32, ptr %23, align 4, !tbaa !5
  store i32 %262, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %224, !llvm.loop !18

263:                                              ; preds = %276, %267, %234
  %264 = landingpad { ptr, i32 }
          cleanup
  %265 = extractvalue { ptr, i32 } %264, 0
  store ptr %265, ptr %11, align 8
  %266 = extractvalue { ptr, i32 } %264, 1
  store i32 %266, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  br label %279

267:                                              ; preds = %224
  %268 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  %269 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %268, ptr %269, align 8
  %270 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  %271 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %270, ptr %271, align 8
  %272 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  %273 = load ptr, ptr %272, align 8
  %274 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  %275 = load ptr, ptr %274, align 8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr %273, ptr %275)
          to label %276 unwind label %263

276:                                              ; preds = %267
  %277 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) @_Z3resB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %21)
          to label %278 unwind label %263

278:                                              ; preds = %276
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %9) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %9) #7
  ret void

279:                                              ; preds = %263, %220, %114, %110
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %9) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %9) #7
  br label %280

280:                                              ; preds = %279
  %281 = load ptr, ptr %11, align 8
  %282 = load i32, ptr %12, align 4
  %283 = insertvalue { ptr, i32 } poison, ptr %281, 0
  %284 = insertvalue { ptr, i32 } %283, i32 %282, 1
  resume { ptr, i32 } %284

285:                                              ; preds = %217, %206
  unreachable
}

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

declare i32 @__gxx_personality_v0(...)

; 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #3 align 2

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!14 = !{!13, !6, i64 4}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}


; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"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 }
%"struct.std::pair" = type { i32, i32 }

@dx = external dso_local local_unnamed_addr global [4 x i32], align 16
@dy = external dso_local local_unnamed_addr global [4 x i32], align 16
@_Z3resB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@vis = external dso_local local_unnamed_addr global [21 x [21 x i32]], align 16
@pre = external dso_local local_unnamed_addr global [21 x [21 x [2 x i32]]], align 16
@type = external dso_local local_unnamed_addr global [21 x [21 x i32]], align 16
@Dx = external dso_local local_unnamed_addr global i32, align 4
@Dy = external dso_local local_unnamed_addr global i32, align 4

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3bfsii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.std::queue", align 8
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %13 = tail call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z3resB5cxx11) #6
  store ptr %13, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %14 = tail call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z3resB5cxx11) #6
  store ptr %14, ptr %6, align 8
  %15 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %51, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1764) @vis, i8 0, i64 1764, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(3528) @pre, i8 -1, i64 3528, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1764) @type, i8 -1, i64 1764, i1 false)
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %7) #6
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %16 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %54 unwind label %62

.lr.ph:                                           ; preds = %2, %51
  %17 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %18 = load i8, ptr %17, align 1, !tbaa !9
  switch i8 %18, label %51 [
    i8 76, label %19
    i8 82, label %27
    i8 85, label %35
    i8 68, label %43
  ]

19:                                               ; preds = %.lr.ph
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = add nsw i32 %21, -1
  %23 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %20, i32 noundef %22)
  br i1 %23, label %24, label %51

24:                                               ; preds = %19
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = add nsw i32 %25, -1
  store i32 %26, ptr %4, align 4, !tbaa !5
  br label %51

27:                                               ; preds = %.lr.ph
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = add nsw i32 %29, 1
  %31 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %28, i32 noundef %30)
  br i1 %31, label %32, label %51

32:                                               ; preds = %27
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %4, align 4, !tbaa !5
  br label %51

35:                                               ; preds = %.lr.ph
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = add nsw i32 %36, -1
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %37, i32 noundef %38)
  br i1 %39, label %40, label %51

40:                                               ; preds = %35
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = add nsw i32 %41, -1
  store i32 %42, ptr %3, align 4, !tbaa !5
  br label %51

43:                                               ; preds = %.lr.ph
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %45, i32 noundef %46)
  br i1 %47, label %48, label %51

48:                                               ; preds = %43
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %3, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %35, %40, %27, %32, %19, %24, %.lr.ph, %48, %43
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %53 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %53, label %.lr.ph, label %._crit_edge

54:                                               ; preds = %._crit_edge
  store i64 %16, ptr %8, align 8
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr noundef nonnull align 4 dereferenceable(8) %8)
          to label %55 unwind label %62

55:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  %56 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
  br i1 %56, label %.thread, label %.lr.ph39

.lr.ph39:                                         ; preds = %55, %.loopexit36
  %57 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
  %.sroa.019.0.copyload = load i32, ptr %57, align 4
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %57, i64 4
  %.sroa.5.0.copyload = load i32, ptr %.sroa.5.0..sroa_idx, align 4
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
  %58 = load i32, ptr @Dx, align 4, !tbaa !5
  %59 = icmp eq i32 %.sroa.019.0.copyload, %58
  %60 = load i32, ptr @Dy, align 4
  %61 = icmp eq i32 %.sroa.5.0.copyload, %60
  %or.cond = select i1 %59, i1 %61, i1 false
  br i1 %or.cond, label %.thread, label %64

62:                                               ; preds = %54, %._crit_edge
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %193

64:                                               ; preds = %.lr.ph39
  %65 = sext i32 %.sroa.019.0.copyload to i64
  %66 = sext i32 %.sroa.5.0.copyload to i64
  %67 = getelementptr inbounds [21 x [21 x i32]], ptr @vis, i64 0, i64 %65, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %.not = icmp eq i32 %68, 0
  br i1 %.not, label %69, label %.loopexit36, !llvm.loop !10

69:                                               ; preds = %64
  store i32 1, ptr %67, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  %70 = load i32, ptr @dx, align 16, !tbaa !5
  %71 = add nsw i32 %70, %.sroa.019.0.copyload
  store i32 %71, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  %72 = load i32, ptr @dy, align 16, !tbaa !5
  %73 = add nsw i32 %72, %.sroa.5.0.copyload
  store i32 %73, ptr %10, align 4, !tbaa !5
  %74 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %71, i32 noundef %73)
  br i1 %74, label %75, label %91

75:                                               ; preds = %69
  %76 = load i32, ptr %9, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = load i32, ptr %10, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [21 x [21 x [2 x i32]]], ptr @pre, i64 0, i64 %77, i64 %79
  %81 = load i32, ptr %80, align 8, !tbaa !5
  %.not28 = icmp eq i32 %81, -1
  br i1 %.not28, label %82, label %91

82:                                               ; preds = %75
  %83 = getelementptr inbounds [21 x [21 x i32]], ptr @vis, i64 0, i64 %77, i64 %79
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %.not29 = icmp eq i32 %84, 0
  br i1 %.not29, label %85, label %91

85:                                               ; preds = %82
  store i32 %.sroa.019.0.copyload, ptr %80, align 8, !tbaa !5
  %86 = getelementptr inbounds [21 x [21 x [2 x i32]]], ptr @pre, i64 0, i64 %77, i64 %79, i64 1
  store i32 %.sroa.5.0.copyload, ptr %86, align 4, !tbaa !5
  %87 = getelementptr inbounds [21 x [21 x i32]], ptr @type, i64 0, i64 %77, i64 %79
  store i32 0, ptr %87, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %88 = invoke 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)
          to label %89 unwind label %157

89:                                               ; preds = %85
  store i64 %88, ptr %11, align 8
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr noundef nonnull align 4 dereferenceable(8) %11)
          to label %90 unwind label %157

90:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br label %91

91:                                               ; preds = %69, %75, %82, %90
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  %92 = load i32, ptr getelementptr inbounds (i8, ptr @dx, i64 4), align 4, !tbaa !5
  %93 = add nsw i32 %92, %.sroa.019.0.copyload
  store i32 %93, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  %94 = load i32, ptr getelementptr inbounds (i8, ptr @dy, i64 4), align 4, !tbaa !5
  %95 = add nsw i32 %94, %.sroa.5.0.copyload
  store i32 %95, ptr %10, align 4, !tbaa !5
  %96 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %93, i32 noundef %95)
  br i1 %96, label %97, label %113

97:                                               ; preds = %91
  %98 = load i32, ptr %9, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = load i32, ptr %10, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [21 x [21 x [2 x i32]]], ptr @pre, i64 0, i64 %99, i64 %101
  %103 = load i32, ptr %102, align 8, !tbaa !5
  %.not28.1 = icmp eq i32 %103, -1
  br i1 %.not28.1, label %104, label %113

104:                                              ; preds = %97
  %105 = getelementptr inbounds [21 x [21 x i32]], ptr @vis, i64 0, i64 %99, i64 %101
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %.not29.1 = icmp eq i32 %106, 0
  br i1 %.not29.1, label %107, label %113

107:                                              ; preds = %104
  store i32 %.sroa.019.0.copyload, ptr %102, align 8, !tbaa !5
  %108 = getelementptr inbounds [21 x [21 x [2 x i32]]], ptr @pre, i64 0, i64 %99, i64 %101, i64 1
  store i32 %.sroa.5.0.copyload, ptr %108, align 4, !tbaa !5
  %109 = getelementptr inbounds [21 x [21 x i32]], ptr @type, i64 0, i64 %99, i64 %101
  store i32 1, ptr %109, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %110 = invoke 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)
          to label %111 unwind label %157

111:                                              ; preds = %107
  store i64 %110, ptr %11, align 8
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr noundef nonnull align 4 dereferenceable(8) %11)
          to label %112 unwind label %157

112:                                              ; preds = %111
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br label %113

113:                                              ; preds = %112, %104, %97, %91
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  %114 = load i32, ptr getelementptr inbounds (i8, ptr @dx, i64 8), align 8, !tbaa !5
  %115 = add nsw i32 %114, %.sroa.019.0.copyload
  store i32 %115, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  %116 = load i32, ptr getelementptr inbounds (i8, ptr @dy, i64 8), align 8, !tbaa !5
  %117 = add nsw i32 %116, %.sroa.5.0.copyload
  store i32 %117, ptr %10, align 4, !tbaa !5
  %118 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %115, i32 noundef %117)
  br i1 %118, label %119, label %135

119:                                              ; preds = %113
  %120 = load i32, ptr %9, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = load i32, ptr %10, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [21 x [21 x [2 x i32]]], ptr @pre, i64 0, i64 %121, i64 %123
  %125 = load i32, ptr %124, align 8, !tbaa !5
  %.not28.2 = icmp eq i32 %125, -1
  br i1 %.not28.2, label %126, label %135

126:                                              ; preds = %119
  %127 = getelementptr inbounds [21 x [21 x i32]], ptr @vis, i64 0, i64 %121, i64 %123
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %.not29.2 = icmp eq i32 %128, 0
  br i1 %.not29.2, label %129, label %135

129:                                              ; preds = %126
  store i32 %.sroa.019.0.copyload, ptr %124, align 8, !tbaa !5
  %130 = getelementptr inbounds [21 x [21 x [2 x i32]]], ptr @pre, i64 0, i64 %121, i64 %123, i64 1
  store i32 %.sroa.5.0.copyload, ptr %130, align 4, !tbaa !5
  %131 = getelementptr inbounds [21 x [21 x i32]], ptr @type, i64 0, i64 %121, i64 %123
  store i32 2, ptr %131, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %132 = invoke 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)
          to label %133 unwind label %157

133:                                              ; preds = %129
  store i64 %132, ptr %11, align 8
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr noundef nonnull align 4 dereferenceable(8) %11)
          to label %134 unwind label %157

134:                                              ; preds = %133
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br label %135

135:                                              ; preds = %134, %126, %119, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  %136 = load i32, ptr getelementptr inbounds (i8, ptr @dx, i64 12), align 4, !tbaa !5
  %137 = add nsw i32 %136, %.sroa.019.0.copyload
  store i32 %137, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  %138 = load i32, ptr getelementptr inbounds (i8, ptr @dy, i64 12), align 4, !tbaa !5
  %139 = add nsw i32 %138, %.sroa.5.0.copyload
  store i32 %139, ptr %10, align 4, !tbaa !5
  %140 = call noundef zeroext i1 @_Z7inrangeii(i32 noundef %137, i32 noundef %139)
  br i1 %140, label %141, label %.loopexit36.loopexit

141:                                              ; preds = %135
  %142 = load i32, ptr %9, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = load i32, ptr %10, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [21 x [21 x [2 x i32]]], ptr @pre, i64 0, i64 %143, i64 %145
  %147 = load i32, ptr %146, align 8, !tbaa !5
  %.not28.3 = icmp eq i32 %147, -1
  br i1 %.not28.3, label %148, label %.loopexit36.loopexit

148:                                              ; preds = %141
  %149 = getelementptr inbounds [21 x [21 x i32]], ptr @vis, i64 0, i64 %143, i64 %145
  %150 = load i32, ptr %149, align 4, !tbaa !5
  %.not29.3 = icmp eq i32 %150, 0
  br i1 %.not29.3, label %151, label %.loopexit36.loopexit

151:                                              ; preds = %148
  store i32 %.sroa.019.0.copyload, ptr %146, align 8, !tbaa !5
  %152 = getelementptr inbounds [21 x [21 x [2 x i32]]], ptr @pre, i64 0, i64 %143, i64 %145, i64 1
  store i32 %.sroa.5.0.copyload, ptr %152, align 4, !tbaa !5
  %153 = getelementptr inbounds [21 x [21 x i32]], ptr @type, i64 0, i64 %143, i64 %145
  store i32 3, ptr %153, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %154 = invoke 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)
          to label %155 unwind label %157

155:                                              ; preds = %151
  store i64 %154, ptr %11, align 8
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr noundef nonnull align 4 dereferenceable(8) %11)
          to label %156 unwind label %157

156:                                              ; preds = %155
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br label %.loopexit36.loopexit

.loopexit36.loopexit:                             ; preds = %156, %148, %141, %135
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  br label %.loopexit36

157:                                              ; preds = %155, %151, %133, %129, %111, %107, %89, %85
  %158 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  br label %193

.loopexit36:                                      ; preds = %.loopexit36.loopexit, %64
  %159 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
  br i1 %159, label %.thread, label %.lr.ph39

.thread:                                          ; preds = %.loopexit36, %.lr.ph39, %55
  %160 = load i32, ptr @Dx, align 4, !tbaa !5
  store i32 %160, ptr %3, align 4, !tbaa !5
  %161 = load i32, ptr @Dy, align 4, !tbaa !5
  store i32 %161, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  %162 = load i32, ptr %3, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = load i32, ptr %4, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [21 x [21 x [2 x i32]]], ptr @pre, i64 0, i64 %163, i64 %165
  %167 = load i32, ptr %166, align 8, !tbaa !5
  %.not3041 = icmp eq i32 %167, -1
  br i1 %.not3041, label %._crit_edge43, label %.lr.ph42

.lr.ph42:                                         ; preds = %.thread, %174
  %168 = phi i64 [ %184, %174 ], [ %165, %.thread ]
  %169 = phi i64 [ %183, %174 ], [ %163, %.thread ]
  %170 = getelementptr inbounds [21 x [21 x i32]], ptr @type, i64 0, i64 %169, i64 %168
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = call noundef signext i8 @_Z4getci(i32 noundef %171)
  %173 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %12, i8 noundef signext %172)
          to label %174 unwind label %.loopexit

174:                                              ; preds = %.lr.ph42
  %175 = load i32, ptr %3, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = load i32, ptr %4, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [21 x [21 x [2 x i32]]], ptr @pre, i64 0, i64 %176, i64 %178
  %180 = load i32, ptr %179, align 8, !tbaa !5
  %181 = getelementptr inbounds i8, ptr %179, i64 4
  %182 = load i32, ptr %181, align 4, !tbaa !5
  store i32 %180, ptr %3, align 4, !tbaa !5
  store i32 %182, ptr %4, align 4, !tbaa !5
  %183 = sext i32 %180 to i64
  %184 = sext i32 %182 to i64
  %185 = getelementptr inbounds [21 x [21 x [2 x i32]]], ptr @pre, i64 0, i64 %183, i64 %184
  %186 = load i32, ptr %185, align 8, !tbaa !5
  %.not30 = icmp eq i32 %186, -1
  br i1 %.not30, label %._crit_edge43, label %.lr.ph42, !llvm.loop !12

.loopexit:                                        ; preds = %.lr.ph42
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %187

.loopexit.split-lp:                               ; preds = %._crit_edge43, %190
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %187

187:                                              ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  br label %193

._crit_edge43:                                    ; preds = %174, %.thread
  %188 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  %189 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_(ptr %188, ptr %189)
          to label %190 unwind label %.loopexit.split-lp

190:                                              ; preds = %._crit_edge43
  %191 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) @_Z3resB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %192 unwind label %.loopexit.split-lp

192:                                              ; preds = %190
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #6
  ret void

193:                                              ; preds = %187, %157, %62
  %.pn = phi { ptr, i32 } [ %lpad.phi, %187 ], [ %158, %157 ], [ %63, %62 ]
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #6
  resume { ptr, i32 } %.pn
}

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

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

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

declare i32 @__gxx_personality_v0(...)

; 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: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) local_unnamed_addr #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #3 align 2

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass