; LLVM IR from eyangch/competitive-programming :: AdventOfCode/2022/day12/day12.2 (main)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { 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" }
%"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::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%"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<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%class.anon = type { i8 }

@dx = external dso_local global [4 x i64], align 16
@dy = external dso_local global [4 x i64], align 16
@N = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@_Z1SB5cxx11 = external dso_local global %"class.std::vector", align 8
@D = external dso_local global [1000 x [1000 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector.3", align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca %"class.std::queue", align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"struct.std::pair", align 8
  %19 = alloca %class.anon, align 1
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca %"struct.std::pair", align 8
  store i32 0, ptr %1, align 4
  %26 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %27 = getelementptr i8, ptr %26, i64 -24
  %28 = load i64, ptr %27, align 8
  %29 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %28
  %30 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %29, ptr noundef null)
  %31 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  br label %32

32:                                               ; preds = %50, %0
  %33 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_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) %2)
          to label %34 unwind label %45

34:                                               ; preds = %32
  %35 = load ptr, ptr %33, align 8, !tbaa !5
  %36 = getelementptr i8, ptr %35, i64 -24
  %37 = load i64, ptr %36, align 8
  %38 = getelementptr inbounds i8, ptr %33, i64 %37
  %39 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %38)
          to label %40 unwind label %45

40:                                               ; preds = %34
  br i1 %39, label %41, label %51

41:                                               ; preds = %40
  %42 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  %43 = icmp eq i64 %42, 0
  br i1 %43, label %44, label %49

44:                                               ; preds = %41
  br label %51

45:                                               ; preds = %49, %34, %32
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %3, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %4, align 4
  br label %300

49:                                               ; preds = %41
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %50 unwind label %45

50:                                               ; preds = %49
  br label %32, !llvm.loop !8

51:                                               ; preds = %44, %40
  %52 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11) #8
  store i64 %52, ptr @N, align 8, !tbaa !10
  %53 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef 0) #8
  %54 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %53) #8
  store i64 %54, ptr @M, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #8
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  store i64 0, ptr %8, align 8, !tbaa !10
  br label %55

55:                                               ; preds = %123, %51
  %56 = load i64, ptr %8, align 8, !tbaa !10
  %57 = load i64, ptr @N, align 8, !tbaa !10
  %58 = icmp slt i64 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  store i32 4, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %126

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  store i64 0, ptr %10, align 8, !tbaa !10
  br label %61

61:                                               ; preds = %118, %60
  %62 = load i64, ptr %10, align 8, !tbaa !10
  %63 = load i64, ptr @M, align 8, !tbaa !10
  %64 = icmp slt i64 %62, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %61
  store i32 7, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %122

66:                                               ; preds = %61
  %67 = load i64, ptr %8, align 8, !tbaa !10
  %68 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %67) #8
  %69 = load i64, ptr %10, align 8, !tbaa !10
  %70 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %68, i64 noundef %69)
          to label %71 unwind label %92

71:                                               ; preds = %66
  %72 = load i8, ptr %70, align 1, !tbaa !13
  %73 = sext i8 %72 to i32
  %74 = icmp eq i32 %73, 83
  br i1 %74, label %84, label %75

75:                                               ; preds = %71
  %76 = load i64, ptr %8, align 8, !tbaa !10
  %77 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %76) #8
  %78 = load i64, ptr %10, align 8, !tbaa !10
  %79 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %77, i64 noundef %78)
          to label %80 unwind label %92

80:                                               ; preds = %75
  %81 = load i8, ptr %79, align 1, !tbaa !13
  %82 = sext i8 %81 to i32
  %83 = icmp eq i32 %82, 97
  br i1 %83, label %84, label %100

84:                                               ; preds = %80, %71
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #8
  invoke void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %85 unwind label %96

85:                                               ; preds = %84
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %86 unwind label %96

86:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  %87 = load i64, ptr %8, align 8, !tbaa !10
  %88 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %87) #8
  %89 = load i64, ptr %10, align 8, !tbaa !10
  %90 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %88, i64 noundef %89)
          to label %91 unwind label %92

91:                                               ; preds = %86
  store i8 97, ptr %90, align 1, !tbaa !13
  br label %100

92:                                               ; preds = %109, %100, %86, %75, %66
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %3, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %4, align 4
  br label %121

96:                                               ; preds = %85, %84
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %3, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  br label %121

100:                                              ; preds = %91, %80
  %101 = load i64, ptr %8, align 8, !tbaa !10
  %102 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %101) #8
  %103 = load i64, ptr %10, align 8, !tbaa !10
  %104 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %102, i64 noundef %103)
          to label %105 unwind label %92

105:                                              ; preds = %100
  %106 = load i8, ptr %104, align 1, !tbaa !13
  %107 = sext i8 %106 to i32
  %108 = icmp eq i32 %107, 69
  br i1 %108, label %109, label %117

109:                                              ; preds = %105
  %110 = load i64, ptr %8, align 8, !tbaa !10
  store i64 %110, ptr %6, align 8, !tbaa !10
  %111 = load i64, ptr %10, align 8, !tbaa !10
  store i64 %111, ptr %7, align 8, !tbaa !10
  %112 = load i64, ptr %8, align 8, !tbaa !10
  %113 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %112) #8
  %114 = load i64, ptr %10, align 8, !tbaa !10
  %115 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %113, i64 noundef %114)
          to label %116 unwind label %92

116:                                              ; preds = %109
  store i8 122, ptr %115, align 1, !tbaa !13
  br label %117

117:                                              ; preds = %116, %105
  br label %118

118:                                              ; preds = %117
  %119 = load i64, ptr %10, align 8, !tbaa !10
  %120 = add nsw i64 %119, 1
  store i64 %120, ptr %10, align 8, !tbaa !10
  br label %61, !llvm.loop !14

121:                                              ; preds = %96, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %299

122:                                              ; preds = %65
  br label %123

123:                                              ; preds = %122
  %124 = load i64, ptr %8, align 8, !tbaa !10
  %125 = add nsw i64 %124, 1
  store i64 %125, ptr %8, align 8, !tbaa !10
  br label %55, !llvm.loop !15

126:                                              ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  store i64 0, ptr %12, align 8, !tbaa !10
  br label %127

127:                                              ; preds = %147, %126
  %128 = load i64, ptr %12, align 8, !tbaa !10
  %129 = load i64, ptr @N, align 8, !tbaa !10
  %130 = icmp slt i64 %128, %129
  br i1 %130, label %132, label %131

131:                                              ; preds = %127
  store i32 10, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %150

132:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  store i64 0, ptr %13, align 8, !tbaa !10
  br label %133

133:                                              ; preds = %143, %132
  %134 = load i64, ptr %13, align 8, !tbaa !10
  %135 = load i64, ptr @M, align 8, !tbaa !10
  %136 = icmp slt i64 %134, %135
  br i1 %136, label %138, label %137

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

138:                                              ; preds = %133
  %139 = load i64, ptr %12, align 8, !tbaa !10
  %140 = getelementptr inbounds [1000 x [1000 x i64]], ptr @D, i64 0, i64 %139
  %141 = load i64, ptr %13, align 8, !tbaa !10
  %142 = getelementptr inbounds [1000 x i64], ptr %140, i64 0, i64 %141
  store i64 -1, ptr %142, align 8, !tbaa !10
  br label %143

143:                                              ; preds = %138
  %144 = load i64, ptr %13, align 8, !tbaa !10
  %145 = add nsw i64 %144, 1
  store i64 %145, ptr %13, align 8, !tbaa !10
  br label %133, !llvm.loop !16

146:                                              ; preds = %137
  br label %147

147:                                              ; preds = %146
  %148 = load i64, ptr %12, align 8, !tbaa !10
  %149 = add nsw i64 %148, 1
  store i64 %149, ptr %12, align 8, !tbaa !10
  br label %127, !llvm.loop !17

150:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 80, ptr %14) #8
  invoke void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
          to label %151 unwind label %161

151:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  store ptr %5, ptr %15, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %152 = load ptr, ptr %15, align 8, !tbaa !18
  %153 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %152) #8
  %154 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %153, ptr %154, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %155 = load ptr, ptr %15, align 8, !tbaa !18
  %156 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %155) #8
  %157 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %156, ptr %157, align 8
  br label %158

158:                                              ; preds = %174, %151
  %159 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  br i1 %159, label %165, label %160

160:                                              ; preds = %158
  store i32 16, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %180

161:                                              ; preds = %150
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %3, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %4, align 4
  br label %298

165:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #8
  %166 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %166, i64 16, i1 false)
  invoke void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %14, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %167 unwind label %176

167:                                              ; preds = %165
  %168 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 0
  %169 = load i64, ptr %168, align 8, !tbaa !20
  %170 = getelementptr inbounds [1000 x [1000 x i64]], ptr @D, i64 0, i64 %169
  %171 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 1
  %172 = load i64, ptr %171, align 8, !tbaa !22
  %173 = getelementptr inbounds [1000 x i64], ptr %170, i64 0, i64 %172
  store i64 0, ptr %173, align 8, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  br label %174

174:                                              ; preds = %167
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  br label %158

176:                                              ; preds = %165
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %3, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %297

180:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #8
  br label %181

181:                                              ; preds = %282, %180
  %182 = invoke noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
          to label %183 unwind label %199

183:                                              ; preds = %181
  %184 = xor i1 %182, true
  br i1 %184, label %185, label %285

185:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %186 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
          to label %187 unwind label %203

187:                                              ; preds = %185
  %188 = getelementptr inbounds %"struct.std::pair", ptr %186, i32 0, i32 0
  %189 = load i64, ptr %188, align 8, !tbaa !20
  store i64 %189, ptr %20, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %190 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
          to label %191 unwind label %207

191:                                              ; preds = %187
  %192 = getelementptr inbounds %"struct.std::pair", ptr %190, i32 0, i32 1
  %193 = load i64, ptr %192, align 8, !tbaa !22
  store i64 %193, ptr %21, align 8, !tbaa !10
  invoke void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
          to label %194 unwind label %207

194:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  store i64 0, ptr %22, align 8, !tbaa !10
  br label %195

195:                                              ; preds = %274, %194
  %196 = load i64, ptr %22, align 8, !tbaa !10
  %197 = icmp slt i64 %196, 4
  br i1 %197, label %211, label %198

198:                                              ; preds = %195
  store i32 20, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %282

199:                                              ; preds = %292, %285, %181
  %200 = landingpad { ptr, i32 }
          cleanup
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %3, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %4, align 4
  br label %296

203:                                              ; preds = %185
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %3, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %4, align 4
  br label %284

207:                                              ; preds = %191, %187
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %3, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %4, align 4
  br label %283

211:                                              ; preds = %195
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %212 = load i64, ptr %20, align 8, !tbaa !10
  %213 = load i64, ptr %22, align 8, !tbaa !10
  %214 = getelementptr inbounds [4 x i64], ptr @dx, i64 0, i64 %213
  %215 = load i64, ptr %214, align 8, !tbaa !10
  %216 = add nsw i64 %212, %215
  store i64 %216, ptr %23, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %217 = load i64, ptr %21, align 8, !tbaa !10
  %218 = load i64, ptr %22, align 8, !tbaa !10
  %219 = getelementptr inbounds [4 x i64], ptr @dy, i64 0, i64 %218
  %220 = load i64, ptr %219, align 8, !tbaa !10
  %221 = add nsw i64 %217, %220
  store i64 %221, ptr %24, align 8, !tbaa !10
  %222 = load i64, ptr %23, align 8, !tbaa !10
  %223 = load i64, ptr %24, align 8, !tbaa !10
  %224 = invoke noundef zeroext i1 @"_ZZ4mainENK3$_0clExx"(ptr noundef nonnull align 1 dereferenceable(1) %19, i64 noundef %222, i64 noundef %223)
          to label %225 unwind label %227

225:                                              ; preds = %211
  br i1 %224, label %231, label %226

226:                                              ; preds = %225
  store i32 22, ptr %9, align 4
  br label %271

227:                                              ; preds = %245, %240, %211
  %228 = landingpad { ptr, i32 }
          cleanup
  %229 = extractvalue { ptr, i32 } %228, 0
  store ptr %229, ptr %3, align 8
  %230 = extractvalue { ptr, i32 } %228, 1
  store i32 %230, ptr %4, align 4
  br label %281

231:                                              ; preds = %225
  %232 = load i64, ptr %23, align 8, !tbaa !10
  %233 = getelementptr inbounds [1000 x [1000 x i64]], ptr @D, i64 0, i64 %232
  %234 = load i64, ptr %24, align 8, !tbaa !10
  %235 = getelementptr inbounds [1000 x i64], ptr %233, i64 0, i64 %234
  %236 = load i64, ptr %235, align 8, !tbaa !10
  %237 = xor i64 %236, -1
  %238 = icmp ne i64 %237, 0
  br i1 %238, label %239, label %240

239:                                              ; preds = %231
  store i32 22, ptr %9, align 4
  br label %271

240:                                              ; preds = %231
  %241 = load i64, ptr %23, align 8, !tbaa !10
  %242 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %241) #8
  %243 = load i64, ptr %24, align 8, !tbaa !10
  %244 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %242, i64 noundef %243)
          to label %245 unwind label %227

245:                                              ; preds = %240
  %246 = load i8, ptr %244, align 1, !tbaa !13
  %247 = sext i8 %246 to i32
  %248 = load i64, ptr %20, align 8, !tbaa !10
  %249 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %248) #8
  %250 = load i64, ptr %21, align 8, !tbaa !10
  %251 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %249, i64 noundef %250)
          to label %252 unwind label %227

252:                                              ; preds = %245
  %253 = load i8, ptr %251, align 1, !tbaa !13
  %254 = sext i8 %253 to i32
  %255 = add nsw i32 %254, 1
  %256 = icmp sgt i32 %247, %255
  br i1 %256, label %257, label %258

257:                                              ; preds = %252
  store i32 22, ptr %9, align 4
  br label %271

258:                                              ; preds = %252
  %259 = load i64, ptr %20, align 8, !tbaa !10
  %260 = getelementptr inbounds [1000 x [1000 x i64]], ptr @D, i64 0, i64 %259
  %261 = load i64, ptr %21, align 8, !tbaa !10
  %262 = getelementptr inbounds [1000 x i64], ptr %260, i64 0, i64 %261
  %263 = load i64, ptr %262, align 8, !tbaa !10
  %264 = add nsw i64 %263, 1
  %265 = load i64, ptr %23, align 8, !tbaa !10
  %266 = getelementptr inbounds [1000 x [1000 x i64]], ptr @D, i64 0, i64 %265
  %267 = load i64, ptr %24, align 8, !tbaa !10
  %268 = getelementptr inbounds [1000 x i64], ptr %266, i64 0, i64 %267
  store i64 %264, ptr %268, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #8
  invoke void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %269 unwind label %277

269:                                              ; preds = %258
  invoke void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %14, ptr noundef nonnull align 8 dereferenceable(16) %25)
          to label %270 unwind label %277

270:                                              ; preds = %269
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #8
  store i32 0, ptr %9, align 4
  br label %271

271:                                              ; preds = %270, %257, %239, %226
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  %272 = load i32, ptr %9, align 4
  switch i32 %272, label %306 [
    i32 0, label %273
    i32 22, label %274
  ]

273:                                              ; preds = %271
  br label %274

274:                                              ; preds = %273, %271
  %275 = load i64, ptr %22, align 8, !tbaa !10
  %276 = add nsw i64 %275, 1
  store i64 %276, ptr %22, align 8, !tbaa !10
  br label %195, !llvm.loop !23

277:                                              ; preds = %269, %258
  %278 = landingpad { ptr, i32 }
          cleanup
  %279 = extractvalue { ptr, i32 } %278, 0
  store ptr %279, ptr %3, align 8
  %280 = extractvalue { ptr, i32 } %278, 1
  store i32 %280, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #8
  br label %281

281:                                              ; preds = %277, %227
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %283

282:                                              ; preds = %198
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %181, !llvm.loop !24

283:                                              ; preds = %281, %207
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %284

284:                                              ; preds = %283, %203
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %296

285:                                              ; preds = %183
  %286 = load i64, ptr %6, align 8, !tbaa !10
  %287 = getelementptr inbounds [1000 x [1000 x i64]], ptr @D, i64 0, i64 %286
  %288 = load i64, ptr %7, align 8, !tbaa !10
  %289 = getelementptr inbounds [1000 x i64], ptr %287, i64 0, i64 %288
  %290 = load i64, ptr %289, align 8, !tbaa !10
  %291 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %290)
          to label %292 unwind label %199

292:                                              ; preds = %285
  %293 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %291, i8 noundef signext 10)
          to label %294 unwind label %199

294:                                              ; preds = %292
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #8
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %14) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #8
  %295 = load i32, ptr %1, align 4
  ret i32 %295

296:                                              ; preds = %284, %199
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #8
  br label %297

297:                                              ; preds = %296, %176
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %14) #8
  br label %298

298:                                              ; preds = %297, %161
  call void @llvm.lifetime.end.p0(i64 80, ptr %14) #8
  br label %299

299:                                              ; preds = %298, %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #8
  br label %300

300:                                              ; preds = %299, %45
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #8
  br label %301

301:                                              ; preds = %300
  %302 = load ptr, ptr %3, align 8
  %303 = load i32, ptr %4, align 4
  %304 = insertvalue { ptr, i32 } poison, ptr %302, 0
  %305 = insertvalue { ptr, i32 } %304, i32 %303, 1
  resume { ptr, i32 } %305

306:                                              ; preds = %271
  unreachable
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) #5 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 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 @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #5 align 2

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

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @"_ZZ4mainENK3$_0clExx"(ptr noundef nonnull align 1 dereferenceable(1), i64 noundef, i64 noundef) #6 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #4

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

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

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

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

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


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { 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" }
%"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::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%"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<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%class.anon = type { i8 }

@dx = external dso_local local_unnamed_addr global [4 x i64], align 16
@dy = external dso_local local_unnamed_addr global [4 x i64], align 16
@N = external dso_local local_unnamed_addr global i64, align 8
@M = external dso_local local_unnamed_addr global i64, align 8
@_Z1SB5cxx11 = external dso_local global %"class.std::vector", align 8
@D = external dso_local local_unnamed_addr global [1000 x [1000 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.std::vector.3", align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca %"class.std::queue", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca %class.anon, align 1
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca %"struct.std::pair", align 8
  %14 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %15 = getelementptr i8, ptr %14, i64 -24
  %16 = load i64, ptr %15, align 8
  %17 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %16
  %18 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %17, ptr noundef null)
  %19 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  br label %20

20:                                               ; preds = %34, %0
  %21 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_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) %1)
          to label %22 unwind label %32

22:                                               ; preds = %20
  %23 = load ptr, ptr %21, align 8, !tbaa !5
  %24 = getelementptr i8, ptr %23, i64 -24
  %25 = load i64, ptr %24, align 8
  %26 = getelementptr inbounds i8, ptr %21, i64 %25
  %27 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %26)
          to label %28 unwind label %32

28:                                               ; preds = %22
  br i1 %27, label %29, label %35

29:                                               ; preds = %28
  %30 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  %31 = icmp eq i64 %30, 0
  br i1 %31, label %35, label %34

32:                                               ; preds = %34, %22, %20
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %265

34:                                               ; preds = %29
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %20 unwind label %32, !llvm.loop !8

35:                                               ; preds = %29, %28
  %36 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11) #9
  store i64 %36, ptr @N, align 8, !tbaa !10
  %37 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef 0) #9
  %38 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %37) #9
  store i64 %38, ptr @M, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #9
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  store i64 0, ptr %3, align 8, !tbaa !10
  %39 = load i64, ptr @N, align 8, !tbaa !10
  %40 = icmp sgt i64 %39, 0
  br i1 %40, label %.lr.ph55, label %._crit_edge56.thread

._crit_edge56.thread:                             ; preds = %35
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  br label %._crit_edge67

.lr.ph55:                                         ; preds = %35
  %41 = load i64, ptr @M, align 8, !tbaa !10
  %42 = icmp sgt i64 %41, 0
  br i1 %42, label %.lr.ph55.split, label %._crit_edge56

._crit_edge56:                                    ; preds = %._crit_edge, %.lr.ph55
  %.033.lcssa = phi i64 [ undef, %.lr.ph55 ], [ %.134.lcssa, %._crit_edge ]
  %.028.lcssa = phi i64 [ undef, %.lr.ph55 ], [ %.129.lcssa, %._crit_edge ]
  %.lcssa = phi i64 [ %39, %.lr.ph55 ], [ %61, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  %43 = icmp sgt i64 %.lcssa, 0
  br i1 %43, label %.preheader.lr.ph, label %._crit_edge67

.preheader.lr.ph:                                 ; preds = %._crit_edge56
  %44 = load i64, ptr @M, align 8, !tbaa !10
  %45 = icmp sgt i64 %44, 0
  br i1 %45, label %.preheader.us.preheader, label %._crit_edge67

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %46 = shl nuw i64 %44, 3
  %xtraiter = and i64 %.lcssa, 7
  %47 = icmp ult i64 %.lcssa, 8
  br i1 %47, label %._crit_edge67.loopexit.unr-lcssa, label %.preheader.us.preheader.new

.preheader.us.preheader.new:                      ; preds = %.preheader.us.preheader
  %unroll_iter = and i64 %.lcssa, 9223372036854775800
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us, %.preheader.us.preheader.new
  %.03266.us = phi i64 [ 0, %.preheader.us.preheader.new ], [ %56, %.preheader.us ]
  %niter = phi i64 [ 0, %.preheader.us.preheader.new ], [ %niter.next.7, %.preheader.us ]
  %48 = mul nuw nsw i64 %.03266.us, 8000
  %scevgep = getelementptr i8, ptr @D, i64 %48
  call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 -1, i64 %46, i1 false), !tbaa !10
  %49 = mul nuw i64 %.03266.us, 8000
  %gep = getelementptr i8, ptr getelementptr (i8, ptr @D, i64 8000), i64 %49
  call void @llvm.memset.p0.i64(ptr align 16 %gep, i8 -1, i64 %46, i1 false), !tbaa !10
  %50 = mul nuw i64 %.03266.us, 8000
  %gep95 = getelementptr i8, ptr getelementptr (i8, ptr @D, i64 16000), i64 %50
  call void @llvm.memset.p0.i64(ptr align 16 %gep95, i8 -1, i64 %46, i1 false), !tbaa !10
  %51 = mul nuw i64 %.03266.us, 8000
  %gep96 = getelementptr i8, ptr getelementptr (i8, ptr @D, i64 24000), i64 %51
  call void @llvm.memset.p0.i64(ptr align 16 %gep96, i8 -1, i64 %46, i1 false), !tbaa !10
  %52 = mul nuw i64 %.03266.us, 8000
  %gep97 = getelementptr i8, ptr getelementptr (i8, ptr @D, i64 32000), i64 %52
  call void @llvm.memset.p0.i64(ptr align 16 %gep97, i8 -1, i64 %46, i1 false), !tbaa !10
  %53 = mul nuw i64 %.03266.us, 8000
  %gep98 = getelementptr i8, ptr getelementptr (i8, ptr @D, i64 40000), i64 %53
  call void @llvm.memset.p0.i64(ptr align 16 %gep98, i8 -1, i64 %46, i1 false), !tbaa !10
  %54 = mul nuw i64 %.03266.us, 8000
  %gep99 = getelementptr i8, ptr getelementptr (i8, ptr @D, i64 48000), i64 %54
  call void @llvm.memset.p0.i64(ptr align 16 %gep99, i8 -1, i64 %46, i1 false), !tbaa !10
  %55 = mul nuw i64 %.03266.us, 8000
  %gep100 = getelementptr i8, ptr getelementptr (i8, ptr @D, i64 56000), i64 %55
  call void @llvm.memset.p0.i64(ptr align 16 %gep100, i8 -1, i64 %46, i1 false), !tbaa !10
  %56 = add nuw nsw i64 %.03266.us, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %._crit_edge67.loopexit.unr-lcssa, label %.preheader.us, !llvm.loop !13

.lr.ph55.split:                                   ; preds = %.lr.ph55, %._crit_edge
  %57 = phi i64 [ %61, %._crit_edge ], [ %39, %.lr.ph55 ]
  %58 = phi i64 [ %64, %._crit_edge ], [ 0, %.lr.ph55 ]
  %59 = phi i64 [ %63, %._crit_edge ], [ %41, %.lr.ph55 ]
  %.02853 = phi i64 [ %.129.lcssa, %._crit_edge ], [ undef, %.lr.ph55 ]
  %.03352 = phi i64 [ %.134.lcssa, %._crit_edge ], [ undef, %.lr.ph55 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  store i64 0, ptr %4, align 8, !tbaa !10
  %60 = icmp sgt i64 %59, 0
  br i1 %60, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %100
  %.pre = load i64, ptr %3, align 8, !tbaa !10
  %.pre79 = load i64, ptr @N, align 8, !tbaa !10
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph55.split
  %61 = phi i64 [ %57, %.lr.ph55.split ], [ %.pre79, %._crit_edge.loopexit ]
  %62 = phi i64 [ %58, %.lr.ph55.split ], [ %.pre, %._crit_edge.loopexit ]
  %63 = phi i64 [ %59, %.lr.ph55.split ], [ %103, %._crit_edge.loopexit ]
  %.134.lcssa = phi i64 [ %.03352, %.lr.ph55.split ], [ %.235, %._crit_edge.loopexit ]
  %.129.lcssa = phi i64 [ %.02853, %.lr.ph55.split ], [ %.230, %._crit_edge.loopexit ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  %64 = add nsw i64 %62, 1
  store i64 %64, ptr %3, align 8, !tbaa !10
  %65 = icmp slt i64 %64, %61
  br i1 %65, label %.lr.ph55.split, label %._crit_edge56, !llvm.loop !14

.lr.ph:                                           ; preds = %.lr.ph55.split, %100
  %.12950 = phi i64 [ %.230, %100 ], [ %.02853, %.lr.ph55.split ]
  %.13449 = phi i64 [ %.235, %100 ], [ %.03352, %.lr.ph55.split ]
  %66 = load i64, ptr %3, align 8, !tbaa !10
  %67 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %66) #9
  %68 = load i64, ptr %4, align 8, !tbaa !10
  %69 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %67, i64 noundef %68)
  %70 = load i8, ptr %69, align 1, !tbaa !16
  %71 = icmp eq i8 %70, 83
  br i1 %71, label %79, label %72

72:                                               ; preds = %.lr.ph
  %73 = load i64, ptr %3, align 8, !tbaa !10
  %74 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %73) #9
  %75 = load i64, ptr %4, align 8, !tbaa !10
  %76 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %74, i64 noundef %75)
  %77 = load i8, ptr %76, align 1, !tbaa !16
  %78 = icmp eq i8 %77, 97
  br i1 %78, label %79, label %87

79:                                               ; preds = %72, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #9
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %80 unwind label %85

80:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #9
  %81 = load i64, ptr %3, align 8, !tbaa !10
  %82 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %81) #9
  %83 = load i64, ptr %4, align 8, !tbaa !10
  %84 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %82, i64 noundef %83)
  store i8 97, ptr %84, align 1, !tbaa !16
  br label %87

85:                                               ; preds = %79
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  br label %264

87:                                               ; preds = %80, %72
  %88 = load i64, ptr %3, align 8, !tbaa !10
  %89 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %88) #9
  %90 = load i64, ptr %4, align 8, !tbaa !10
  %91 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %89, i64 noundef %90)
  %92 = load i8, ptr %91, align 1, !tbaa !16
  %93 = icmp eq i8 %92, 69
  br i1 %93, label %94, label %100

94:                                               ; preds = %87
  %95 = load i64, ptr %3, align 8, !tbaa !10
  %96 = load i64, ptr %4, align 8, !tbaa !10
  %97 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %95) #9
  %98 = load i64, ptr %4, align 8, !tbaa !10
  %99 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %97, i64 noundef %98)
  store i8 122, ptr %99, align 1, !tbaa !16
  br label %100

100:                                              ; preds = %87, %94
  %.235 = phi i64 [ %96, %94 ], [ %.13449, %87 ]
  %.230 = phi i64 [ %95, %94 ], [ %.12950, %87 ]
  %101 = load i64, ptr %4, align 8, !tbaa !10
  %102 = add nsw i64 %101, 1
  store i64 %102, ptr %4, align 8, !tbaa !10
  %103 = load i64, ptr @M, align 8, !tbaa !10
  %104 = icmp slt i64 %102, %103
  br i1 %104, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !17

._crit_edge67.loopexit.unr-lcssa:                 ; preds = %.preheader.us, %.preheader.us.preheader
  %.03266.us.unr = phi i64 [ 0, %.preheader.us.preheader ], [ %56, %.preheader.us ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge67, label %.preheader.us.epil

.preheader.us.epil:                               ; preds = %._crit_edge67.loopexit.unr-lcssa, %.preheader.us.epil
  %.03266.us.epil = phi i64 [ %106, %.preheader.us.epil ], [ %.03266.us.unr, %._crit_edge67.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader.us.epil ], [ 0, %._crit_edge67.loopexit.unr-lcssa ]
  %105 = mul nuw nsw i64 %.03266.us.epil, 8000
  %scevgep.epil = getelementptr i8, ptr @D, i64 %105
  call void @llvm.memset.p0.i64(ptr align 16 %scevgep.epil, i8 -1, i64 %46, i1 false), !tbaa !10
  %106 = add nuw nsw i64 %.03266.us.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge67, label %.preheader.us.epil, !llvm.loop !18

._crit_edge67:                                    ; preds = %._crit_edge67.loopexit.unr-lcssa, %.preheader.us.epil, %.preheader.lr.ph, %._crit_edge56.thread, %._crit_edge56
  %.028.lcssa84 = phi i64 [ undef, %._crit_edge56.thread ], [ %.028.lcssa, %._crit_edge56 ], [ %.028.lcssa, %.preheader.lr.ph ], [ %.028.lcssa, %.preheader.us.epil ], [ %.028.lcssa, %._crit_edge67.loopexit.unr-lcssa ]
  %.033.lcssa83 = phi i64 [ undef, %._crit_edge56.thread ], [ %.033.lcssa, %._crit_edge56 ], [ %.033.lcssa, %.preheader.lr.ph ], [ %.033.lcssa, %.preheader.us.epil ], [ %.033.lcssa, %._crit_edge67.loopexit.unr-lcssa ]
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %6) #9
  invoke void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
          to label %107 unwind label %113

107:                                              ; preds = %._crit_edge67
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %108 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  store ptr %108, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %109 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  store ptr %109, ptr %8, align 8
  %110 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #9
  br i1 %110, label %.lr.ph69, label %._crit_edge70

.lr.ph69:                                         ; preds = %107
  %111 = getelementptr inbounds i8, ptr %9, i64 8
  br label %115

._crit_edge70:                                    ; preds = %117, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #9
  %112 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  br i1 %112, label %._crit_edge74, label %.lr.ph73

113:                                              ; preds = %._crit_edge67
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %263

115:                                              ; preds = %.lr.ph69, %117
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #9
  %116 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %116, i64 16, i1 false)
  invoke void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %117 unwind label %123

117:                                              ; preds = %115
  %118 = load i64, ptr %9, align 8, !tbaa !20
  %119 = load i64, ptr %111, align 8, !tbaa !22
  %120 = getelementptr inbounds [1000 x [1000 x i64]], ptr @D, i64 0, i64 %118, i64 %119
  store i64 0, ptr %120, align 8, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #9
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  %122 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #9
  br i1 %122, label %115, label %._crit_edge70

123:                                              ; preds = %115
  %124 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  br label %262

.lr.ph73:                                         ; preds = %._crit_edge70, %.loopexit
  %125 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  %126 = load i64, ptr %125, align 8, !tbaa !20
  %127 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  %128 = getelementptr inbounds i8, ptr %127, i64 8
  %129 = load i64, ptr %128, align 8, !tbaa !22
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  %130 = getelementptr inbounds [1000 x [1000 x i64]], ptr @D, i64 0, i64 %126, i64 %129
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #9
  %131 = load i64, ptr @dx, align 16, !tbaa !10
  %132 = add nsw i64 %131, %126
  store i64 %132, ptr %11, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  %133 = load i64, ptr @dy, align 16, !tbaa !10
  %134 = add nsw i64 %133, %129
  store i64 %134, ptr %12, align 8, !tbaa !10
  %135 = call noundef zeroext i1 @"_ZZ4mainENK3$_0clExx"(ptr noundef nonnull align 1 dereferenceable(1) %10, i64 noundef %132, i64 noundef %134)
  br i1 %135, label %138, label %162

136:                                              ; preds = %258, %._crit_edge74
  %137 = landingpad { ptr, i32 }
          cleanup
  br label %261

138:                                              ; preds = %.lr.ph73
  %139 = load i64, ptr %11, align 8, !tbaa !10
  %140 = load i64, ptr %12, align 8, !tbaa !10
  %141 = getelementptr inbounds [1000 x [1000 x i64]], ptr @D, i64 0, i64 %139, i64 %140
  %142 = load i64, ptr %141, align 8, !tbaa !10
  %.not = icmp eq i64 %142, -1
  br i1 %.not, label %143, label %162

143:                                              ; preds = %138
  %144 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %139) #9
  %145 = load i64, ptr %12, align 8, !tbaa !10
  %146 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %144, i64 noundef %145)
  %147 = load i8, ptr %146, align 1, !tbaa !16
  %148 = sext i8 %147 to i32
  %149 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %126) #9
  %150 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %149, i64 noundef %129)
  %151 = load i8, ptr %150, align 1, !tbaa !16
  %152 = sext i8 %151 to i32
  %153 = add nsw i32 %152, 1
  %154 = icmp slt i32 %153, %148
  br i1 %154, label %162, label %155

155:                                              ; preds = %143
  %156 = load i64, ptr %130, align 8, !tbaa !10
  %157 = add nsw i64 %156, 1
  %158 = load i64, ptr %11, align 8, !tbaa !10
  %159 = load i64, ptr %12, align 8, !tbaa !10
  %160 = getelementptr inbounds [1000 x [1000 x i64]], ptr @D, i64 0, i64 %158, i64 %159
  store i64 %157, ptr %160, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #9
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12)
  invoke void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %161 unwind label %253

161:                                              ; preds = %155
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #9
  br label %162

162:                                              ; preds = %143, %138, %.lr.ph73, %161
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #9
  %163 = load i64, ptr getelementptr inbounds (i8, ptr @dx, i64 8), align 8, !tbaa !10
  %164 = add nsw i64 %163, %126
  store i64 %164, ptr %11, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  %165 = load i64, ptr getelementptr inbounds (i8, ptr @dy, i64 8), align 8, !tbaa !10
  %166 = add nsw i64 %165, %129
  store i64 %166, ptr %12, align 8, !tbaa !10
  %167 = call noundef zeroext i1 @"_ZZ4mainENK3$_0clExx"(ptr noundef nonnull align 1 dereferenceable(1) %10, i64 noundef %164, i64 noundef %166)
  br i1 %167, label %168, label %192

168:                                              ; preds = %162
  %169 = load i64, ptr %11, align 8, !tbaa !10
  %170 = load i64, ptr %12, align 8, !tbaa !10
  %171 = getelementptr inbounds [1000 x [1000 x i64]], ptr @D, i64 0, i64 %169, i64 %170
  %172 = load i64, ptr %171, align 8, !tbaa !10
  %.not.1 = icmp eq i64 %172, -1
  br i1 %.not.1, label %173, label %192

173:                                              ; preds = %168
  %174 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %169) #9
  %175 = load i64, ptr %12, align 8, !tbaa !10
  %176 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %174, i64 noundef %175)
  %177 = load i8, ptr %176, align 1, !tbaa !16
  %178 = sext i8 %177 to i32
  %179 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %126) #9
  %180 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %179, i64 noundef %129)
  %181 = load i8, ptr %180, align 1, !tbaa !16
  %182 = sext i8 %181 to i32
  %183 = add nsw i32 %182, 1
  %184 = icmp slt i32 %183, %178
  br i1 %184, label %192, label %185

185:                                              ; preds = %173
  %186 = load i64, ptr %130, align 8, !tbaa !10
  %187 = add nsw i64 %186, 1
  %188 = load i64, ptr %11, align 8, !tbaa !10
  %189 = load i64, ptr %12, align 8, !tbaa !10
  %190 = getelementptr inbounds [1000 x [1000 x i64]], ptr @D, i64 0, i64 %188, i64 %189
  store i64 %187, ptr %190, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #9
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12)
  invoke void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %191 unwind label %253

191:                                              ; preds = %185
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #9
  br label %192

192:                                              ; preds = %191, %173, %168, %162
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #9
  %193 = load i64, ptr getelementptr inbounds (i8, ptr @dx, i64 16), align 16, !tbaa !10
  %194 = add nsw i64 %193, %126
  store i64 %194, ptr %11, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  %195 = load i64, ptr getelementptr inbounds (i8, ptr @dy, i64 16), align 16, !tbaa !10
  %196 = add nsw i64 %195, %129
  store i64 %196, ptr %12, align 8, !tbaa !10
  %197 = call noundef zeroext i1 @"_ZZ4mainENK3$_0clExx"(ptr noundef nonnull align 1 dereferenceable(1) %10, i64 noundef %194, i64 noundef %196)
  br i1 %197, label %198, label %222

198:                                              ; preds = %192
  %199 = load i64, ptr %11, align 8, !tbaa !10
  %200 = load i64, ptr %12, align 8, !tbaa !10
  %201 = getelementptr inbounds [1000 x [1000 x i64]], ptr @D, i64 0, i64 %199, i64 %200
  %202 = load i64, ptr %201, align 8, !tbaa !10
  %.not.2 = icmp eq i64 %202, -1
  br i1 %.not.2, label %203, label %222

203:                                              ; preds = %198
  %204 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %199) #9
  %205 = load i64, ptr %12, align 8, !tbaa !10
  %206 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %204, i64 noundef %205)
  %207 = load i8, ptr %206, align 1, !tbaa !16
  %208 = sext i8 %207 to i32
  %209 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %126) #9
  %210 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %209, i64 noundef %129)
  %211 = load i8, ptr %210, align 1, !tbaa !16
  %212 = sext i8 %211 to i32
  %213 = add nsw i32 %212, 1
  %214 = icmp slt i32 %213, %208
  br i1 %214, label %222, label %215

215:                                              ; preds = %203
  %216 = load i64, ptr %130, align 8, !tbaa !10
  %217 = add nsw i64 %216, 1
  %218 = load i64, ptr %11, align 8, !tbaa !10
  %219 = load i64, ptr %12, align 8, !tbaa !10
  %220 = getelementptr inbounds [1000 x [1000 x i64]], ptr @D, i64 0, i64 %218, i64 %219
  store i64 %217, ptr %220, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #9
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12)
  invoke void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %221 unwind label %253

221:                                              ; preds = %215
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #9
  br label %222

222:                                              ; preds = %221, %203, %198, %192
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #9
  %223 = load i64, ptr getelementptr inbounds (i8, ptr @dx, i64 24), align 8, !tbaa !10
  %224 = add nsw i64 %223, %126
  store i64 %224, ptr %11, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  %225 = load i64, ptr getelementptr inbounds (i8, ptr @dy, i64 24), align 8, !tbaa !10
  %226 = add nsw i64 %225, %129
  store i64 %226, ptr %12, align 8, !tbaa !10
  %227 = call noundef zeroext i1 @"_ZZ4mainENK3$_0clExx"(ptr noundef nonnull align 1 dereferenceable(1) %10, i64 noundef %224, i64 noundef %226)
  br i1 %227, label %228, label %.loopexit

228:                                              ; preds = %222
  %229 = load i64, ptr %11, align 8, !tbaa !10
  %230 = load i64, ptr %12, align 8, !tbaa !10
  %231 = getelementptr inbounds [1000 x [1000 x i64]], ptr @D, i64 0, i64 %229, i64 %230
  %232 = load i64, ptr %231, align 8, !tbaa !10
  %.not.3 = icmp eq i64 %232, -1
  br i1 %.not.3, label %233, label %.loopexit

233:                                              ; preds = %228
  %234 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %229) #9
  %235 = load i64, ptr %12, align 8, !tbaa !10
  %236 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %234, i64 noundef %235)
  %237 = load i8, ptr %236, align 1, !tbaa !16
  %238 = sext i8 %237 to i32
  %239 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1SB5cxx11, i64 noundef %126) #9
  %240 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %239, i64 noundef %129)
  %241 = load i8, ptr %240, align 1, !tbaa !16
  %242 = sext i8 %241 to i32
  %243 = add nsw i32 %242, 1
  %244 = icmp slt i32 %243, %238
  br i1 %244, label %.loopexit, label %245

245:                                              ; preds = %233
  %246 = load i64, ptr %130, align 8, !tbaa !10
  %247 = add nsw i64 %246, 1
  %248 = load i64, ptr %11, align 8, !tbaa !10
  %249 = load i64, ptr %12, align 8, !tbaa !10
  %250 = getelementptr inbounds [1000 x [1000 x i64]], ptr @D, i64 0, i64 %248, i64 %249
  store i64 %247, ptr %250, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #9
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12)
  invoke void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %251 unwind label %253

251:                                              ; preds = %245
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #9
  br label %.loopexit

.loopexit:                                        ; preds = %251, %233, %228, %222
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  %252 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  br i1 %252, label %._crit_edge74, label %.lr.ph73, !llvm.loop !23

253:                                              ; preds = %245, %215, %185, %155
  %254 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  br label %261

._crit_edge74:                                    ; preds = %.loopexit, %._crit_edge70
  %255 = getelementptr inbounds [1000 x [1000 x i64]], ptr @D, i64 0, i64 %.028.lcssa84, i64 %.033.lcssa83
  %256 = load i64, ptr %255, align 8, !tbaa !10
  %257 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %256)
          to label %258 unwind label %136

258:                                              ; preds = %._crit_edge74
  %259 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %257, i8 noundef signext 10)
          to label %260 unwind label %136

260:                                              ; preds = %258
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #9
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %6) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #9
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #9
  ret i32 0

261:                                              ; preds = %253, %136
  %.pn = phi { ptr, i32 } [ %254, %253 ], [ %137, %136 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #9
  br label %262

262:                                              ; preds = %261, %123
  %.pn37 = phi { ptr, i32 } [ %124, %123 ], [ %.pn, %261 ]
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %6) #9
  br label %263

263:                                              ; preds = %262, %113
  %.pn37.pn = phi { ptr, i32 } [ %.pn37, %262 ], [ %114, %113 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #9
  br label %264

264:                                              ; preds = %263, %85
  %.pn41 = phi { ptr, i32 } [ %86, %85 ], [ %.pn37.pn, %263 ]
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #9
  br label %265

265:                                              ; preds = %264, %32
  %.pn41.pn = phi { ptr, i32 } [ %.pn41, %264 ], [ %33, %32 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #9
  resume { ptr, i32 } %.pn41.pn
}

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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) 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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_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 #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #5 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 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 @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #5 align 2

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

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

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

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

; Function Attrs: mustprogress 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) #7

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @"_ZZ4mainENK3$_0clExx"(ptr noundef nonnull align 1 dereferenceable(1), i64 noundef, i64 noundef) local_unnamed_addr #6 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #4

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

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

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

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

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

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

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

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


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