; LLVM IR from eyangch/competitive-programming :: USACOcontests/platinum/2023.01 (tractor_paths)

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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"struct.std::pair" = type { i64, i64 }
%struct.lift = type { i64, [20 x [200000 x i64]], [20 x [200000 x i64]], [20 x [200000 x i64]], [20 x [200000 x i64]], [20 x i64] }
%"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::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" }
%"struct.std::_Deque_base<long long, std::allocator<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 }

@N = external dso_local global i64, align 8
@Q = external dso_local global i64, align 8
@_Z5T_strB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z5B_strB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@B = external dso_local global [200000 x i8], align 16
@T = external dso_local global [200000 x %"struct.std::pair"], align 16
@Li = external dso_local global [200000 x i64], align 16
@Ri = external dso_local global [200000 x i64], align 16
@L = external dso_local global [200000 x i64], align 16
@R = external dso_local global [200000 x i64], align 16
@pfx = external dso_local global [200000 x i64], align 16
@ppfx = external dso_local global [200000 x i64], align 16
@lif = external dso_local global %struct.lift, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [114 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [21 x i8], align 1
@_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 i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::queue", align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, 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 ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca %"struct.std::pair", align 8
  %20 = alloca %"struct.std::pair", align 8
  store i32 0, ptr %1, align 4
  %21 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %22 = getelementptr i8, ptr %21, i64 -24
  %23 = load i64, ptr %22, align 8
  %24 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %23
  %25 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %24, ptr noundef null)
  %26 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(8) @Q)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(32) @_Z5T_strB5cxx11)
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(32) @_Z5B_strB5cxx11)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #8
  store i64 0, ptr %2, align 8, !tbaa !8
  br label %31

31:                                               ; preds = %45, %0
  %32 = load i64, ptr %2, align 8, !tbaa !8
  %33 = load i64, ptr @N, align 8, !tbaa !8
  %34 = icmp slt i64 %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  br label %48

36:                                               ; preds = %31
  %37 = load i64, ptr %2, align 8, !tbaa !8
  %38 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z5B_strB5cxx11, i64 noundef %37)
  %39 = load i8, ptr %38, align 1, !tbaa !11
  %40 = sext i8 %39 to i32
  %41 = icmp eq i32 %40, 49
  %42 = load i64, ptr %2, align 8, !tbaa !8
  %43 = getelementptr inbounds [200000 x i8], ptr @B, i64 0, i64 %42
  %44 = zext i1 %41 to i8
  store i8 %44, ptr %43, align 1, !tbaa !12
  br label %45

45:                                               ; preds = %36
  %46 = load i64, ptr %2, align 8, !tbaa !8
  %47 = add nsw i64 %46, 1
  store i64 %47, ptr %2, align 8, !tbaa !8
  br label %31, !llvm.loop !14

48:                                               ; preds = %35
  %49 = load i8, ptr @B, align 16, !tbaa !12, !range !16, !noundef !17
  %50 = trunc i8 %49 to i1
  %51 = zext i1 %50 to i64
  store i64 %51, ptr @pfx, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  store i64 1, ptr %3, align 8, !tbaa !8
  br label %52

52:                                               ; preds = %70, %48
  %53 = load i64, ptr %3, align 8, !tbaa !8
  %54 = load i64, ptr @N, align 8, !tbaa !8
  %55 = icmp slt i64 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  br label %73

57:                                               ; preds = %52
  %58 = load i64, ptr %3, align 8, !tbaa !8
  %59 = sub nsw i64 %58, 1
  %60 = getelementptr inbounds [200000 x i64], ptr @pfx, i64 0, i64 %59
  %61 = load i64, ptr %60, align 8, !tbaa !8
  %62 = load i64, ptr %3, align 8, !tbaa !8
  %63 = getelementptr inbounds [200000 x i8], ptr @B, i64 0, i64 %62
  %64 = load i8, ptr %63, align 1, !tbaa !12, !range !16, !noundef !17
  %65 = trunc i8 %64 to i1
  %66 = zext i1 %65 to i64
  %67 = add nsw i64 %61, %66
  %68 = load i64, ptr %3, align 8, !tbaa !8
  %69 = getelementptr inbounds [200000 x i64], ptr @pfx, i64 0, i64 %68
  store i64 %67, ptr %69, align 8, !tbaa !8
  br label %70

70:                                               ; preds = %57
  %71 = load i64, ptr %3, align 8, !tbaa !8
  %72 = add nsw i64 %71, 1
  store i64 %72, ptr %3, align 8, !tbaa !8
  br label %52, !llvm.loop !18

73:                                               ; preds = %56
  store i64 0, ptr @ppfx, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  store i64 1, ptr %4, align 8, !tbaa !8
  br label %74

74:                                               ; preds = %86, %73
  %75 = load i64, ptr %4, align 8, !tbaa !8
  %76 = load i64, ptr @N, align 8, !tbaa !8
  %77 = icmp slt i64 %75, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  br label %89

79:                                               ; preds = %74
  %80 = load i64, ptr %4, align 8, !tbaa !8
  %81 = sub nsw i64 %80, 1
  %82 = getelementptr inbounds [200000 x i64], ptr @pfx, i64 0, i64 %81
  %83 = load i64, ptr %82, align 8, !tbaa !8
  %84 = load i64, ptr %4, align 8, !tbaa !8
  %85 = getelementptr inbounds [200000 x i64], ptr @ppfx, i64 0, i64 %84
  store i64 %83, ptr %85, align 8, !tbaa !8
  br label %86

86:                                               ; preds = %79
  %87 = load i64, ptr %4, align 8, !tbaa !8
  %88 = add nsw i64 %87, 1
  store i64 %88, ptr %4, align 8, !tbaa !8
  br label %74, !llvm.loop !19

89:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 80, ptr %5) #8
  call void @_ZNSt5queueIxSt5dequeIxSaIxEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  store i64 0, ptr %6, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  store i64 0, ptr %7, align 8, !tbaa !8
  br label %90

90:                                               ; preds = %135, %89
  %91 = load i64, ptr %7, align 8, !tbaa !8
  %92 = load i64, ptr @N, align 8, !tbaa !8
  %93 = mul nsw i64 2, %92
  %94 = icmp slt i64 %91, %93
  br i1 %94, label %96, label %95

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

96:                                               ; preds = %90
  %97 = load i64, ptr %7, align 8, !tbaa !8
  %98 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z5T_strB5cxx11, i64 noundef %97)
          to label %99 unwind label %105

99:                                               ; preds = %96
  %100 = load i8, ptr %98, align 1, !tbaa !11
  %101 = sext i8 %100 to i32
  %102 = icmp eq i32 %101, 76
  br i1 %102, label %103, label %109

103:                                              ; preds = %99
  invoke void @_ZNSt5queueIxSt5dequeIxSaIxEEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %104 unwind label %105

104:                                              ; preds = %103
  br label %134

105:                                              ; preds = %103, %96
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %8, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %9, align 4
  br label %138

109:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5queueIxSt5dequeIxSaIxEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %111 unwind label %125

111:                                              ; preds = %109
  %112 = load i64, ptr %110, align 8, !tbaa !8
  store i64 %112, ptr %10, align 8, !tbaa !8
  invoke void @_ZNSt5queueIxSt5dequeIxSaIxEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %113 unwind label %125

113:                                              ; preds = %111
  %114 = load i64, ptr %10, align 8, !tbaa !8
  %115 = load i64, ptr %6, align 8, !tbaa !8
  %116 = getelementptr inbounds [200000 x i64], ptr @Li, i64 0, i64 %115
  store i64 %114, ptr %116, align 8, !tbaa !8
  %117 = load i64, ptr %7, align 8, !tbaa !8
  %118 = load i64, ptr %6, align 8, !tbaa !8
  %119 = getelementptr inbounds [200000 x i64], ptr @Ri, i64 0, i64 %118
  store i64 %117, ptr %119, align 8, !tbaa !8
  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) %10, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %120 unwind label %129

120:                                              ; preds = %113
  %121 = load i64, ptr %6, align 8, !tbaa !8
  %122 = add nsw i64 %121, 1
  store i64 %122, ptr %6, align 8, !tbaa !8
  %123 = getelementptr inbounds [200000 x %"struct.std::pair"], ptr @T, i64 0, i64 %121
  %124 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %123, ptr noundef nonnull align 8 dereferenceable(16) %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %134

125:                                              ; preds = %111, %109
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %8, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %9, align 4
  br label %133

129:                                              ; preds = %113
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %8, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  br label %133

133:                                              ; preds = %129, %125
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %138

134:                                              ; preds = %120, %104
  br label %135

135:                                              ; preds = %134
  %136 = load i64, ptr %7, align 8, !tbaa !8
  %137 = add nsw i64 %136, 1
  store i64 %137, ptr %7, align 8, !tbaa !8
  br label %90, !llvm.loop !20

138:                                              ; preds = %133, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %282

139:                                              ; preds = %95
  %140 = invoke noundef zeroext i1 @_ZNKSt5queueIxSt5dequeIxSaIxEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %141 unwind label %144

141:                                              ; preds = %139
  br i1 %140, label %142, label %143

142:                                              ; preds = %141
  br label %149

143:                                              ; preds = %141
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.3, i32 noundef 118, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

144:                                              ; preds = %188, %139
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %8, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %9, align 4
  br label %282

148:                                              ; No predecessors!
  br label %149

149:                                              ; preds = %148, %142
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  store i64 0, ptr %12, align 8, !tbaa !8
  br label %150

150:                                              ; preds = %181, %149
  %151 = load i64, ptr %12, align 8, !tbaa !8
  %152 = load i64, ptr @N, align 8, !tbaa !8
  %153 = icmp slt i64 %151, %152
  br i1 %153, label %155, label %154

154:                                              ; preds = %150
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %188

155:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %156 = load i64, ptr @N, align 8, !tbaa !8
  %157 = getelementptr inbounds i64, ptr @Ri, i64 %156
  %158 = load i64, ptr %12, align 8, !tbaa !8
  %159 = getelementptr inbounds [200000 x i64], ptr @Li, i64 0, i64 %158
  %160 = invoke noundef ptr @_ZSt11upper_boundIPxxET_S1_S1_RKT0_(ptr noundef @Ri, ptr noundef %157, ptr noundef nonnull align 8 dereferenceable(8) %159)
          to label %161 unwind label %184

161:                                              ; preds = %155
  store ptr %160, ptr %13, align 8, !tbaa !21
  %162 = load ptr, ptr %13, align 8, !tbaa !21
  %163 = ptrtoint ptr %162 to i64
  %164 = sub i64 %163, ptrtoint (ptr @Ri to i64)
  %165 = sdiv exact i64 %164, 8
  %166 = load i64, ptr %12, align 8, !tbaa !8
  %167 = getelementptr inbounds [200000 x i64], ptr @L, i64 0, i64 %166
  store i64 %165, ptr %167, align 8, !tbaa !8
  %168 = load i64, ptr @N, align 8, !tbaa !8
  %169 = getelementptr inbounds i64, ptr @Li, i64 %168
  %170 = load i64, ptr %12, align 8, !tbaa !8
  %171 = getelementptr inbounds [200000 x i64], ptr @Ri, i64 0, i64 %170
  %172 = invoke noundef ptr @_ZSt11upper_boundIPxxET_S1_S1_RKT0_(ptr noundef @Li, ptr noundef %169, ptr noundef nonnull align 8 dereferenceable(8) %171)
          to label %173 unwind label %184

173:                                              ; preds = %161
  store ptr %172, ptr %13, align 8, !tbaa !21
  %174 = load ptr, ptr %13, align 8, !tbaa !21
  %175 = ptrtoint ptr %174 to i64
  %176 = sub i64 %175, ptrtoint (ptr @Li to i64)
  %177 = sdiv exact i64 %176, 8
  %178 = sub nsw i64 %177, 1
  %179 = load i64, ptr %12, align 8, !tbaa !8
  %180 = getelementptr inbounds [200000 x i64], ptr @R, i64 0, i64 %179
  store i64 %178, ptr %180, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %181

181:                                              ; preds = %173
  %182 = load i64, ptr %12, align 8, !tbaa !8
  %183 = add nsw i64 %182, 1
  store i64 %183, ptr %12, align 8, !tbaa !8
  br label %150, !llvm.loop !23

184:                                              ; preds = %161, %155
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %8, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %282

188:                                              ; preds = %154
  %189 = load i64, ptr @N, align 8, !tbaa !8
  invoke void @_ZN4lift4initExRA200000_xS1_S1_S1_(ptr noundef nonnull align 8 dereferenceable(128000168) @lif, i64 noundef %189, ptr noundef nonnull align 8 dereferenceable(1600000) @L, ptr noundef nonnull align 8 dereferenceable(1600000) @R, ptr noundef nonnull align 8 dereferenceable(1600000) @pfx, ptr noundef nonnull align 8 dereferenceable(1600000) @ppfx)
          to label %190 unwind label %144

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

191:                                              ; preds = %275, %190
  %192 = load i64, ptr %14, align 8, !tbaa !8
  %193 = load i64, ptr @Q, align 8, !tbaa !8
  %194 = icmp slt i64 %192, %193
  br i1 %194, label %196, label %195

195:                                              ; preds = %191
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %280

196:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %197 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %198 unwind label %228

198:                                              ; preds = %196
  %199 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %197, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %200 unwind label %228

200:                                              ; preds = %198
  %201 = load i64, ptr %15, align 8, !tbaa !8
  %202 = add nsw i64 %201, -1
  store i64 %202, ptr %15, align 8, !tbaa !8
  %203 = load i64, ptr %16, align 8, !tbaa !8
  %204 = add nsw i64 %203, -1
  store i64 %204, ptr %16, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  store i64 0, ptr %17, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  store i64 0, ptr %18, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #8
  %205 = load i64, ptr %15, align 8, !tbaa !8
  %206 = load i64, ptr %16, align 8, !tbaa !8
  %207 = invoke { i64, i64 } @_ZN4lift4qry1Exx(ptr noundef nonnull align 8 dereferenceable(128000168) @lif, i64 noundef %205, i64 noundef %206)
          to label %208 unwind label %232

208:                                              ; preds = %200
  %209 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 0
  %210 = extractvalue { i64, i64 } %207, 0
  store i64 %210, ptr %209, align 8
  %211 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 1
  %212 = extractvalue { i64, i64 } %207, 1
  store i64 %212, ptr %211, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #8
  %213 = load i64, ptr %15, align 8, !tbaa !8
  %214 = load i64, ptr %16, align 8, !tbaa !8
  %215 = invoke { i64, i64 } @_ZN4lift4qry2Exx(ptr noundef nonnull align 8 dereferenceable(128000168) @lif, i64 noundef %213, i64 noundef %214)
          to label %216 unwind label %236

216:                                              ; preds = %208
  %217 = getelementptr inbounds { i64, i64 }, ptr %20, i32 0, i32 0
  %218 = extractvalue { i64, i64 } %215, 0
  store i64 %218, ptr %217, align 8
  %219 = getelementptr inbounds { i64, i64 }, ptr %20, i32 0, i32 1
  %220 = extractvalue { i64, i64 } %215, 1
  store i64 %220, ptr %219, align 8
  %221 = getelementptr inbounds %"struct.std::pair", ptr %19, i32 0, i32 0
  %222 = load i64, ptr %221, align 8, !tbaa !24
  %223 = getelementptr inbounds %"struct.std::pair", ptr %20, i32 0, i32 0
  %224 = load i64, ptr %223, align 8, !tbaa !24
  %225 = icmp eq i64 %222, %224
  br i1 %225, label %226, label %227

226:                                              ; preds = %216
  br label %241

227:                                              ; preds = %216
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.3, i32 noundef 149, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

228:                                              ; preds = %198, %196
  %229 = landingpad { ptr, i32 }
          cleanup
  %230 = extractvalue { ptr, i32 } %229, 0
  store ptr %230, ptr %8, align 8
  %231 = extractvalue { ptr, i32 } %229, 1
  store i32 %231, ptr %9, align 4
  br label %279

232:                                              ; preds = %200
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %8, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %9, align 4
  br label %278

236:                                              ; preds = %272, %269, %267, %264, %208
  %237 = landingpad { ptr, i32 }
          cleanup
  %238 = extractvalue { ptr, i32 } %237, 0
  store ptr %238, ptr %8, align 8
  %239 = extractvalue { ptr, i32 } %237, 1
  store i32 %239, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #8
  br label %278

240:                                              ; No predecessors!
  br label %241

241:                                              ; preds = %240, %226
  %242 = getelementptr inbounds %"struct.std::pair", ptr %19, i32 0, i32 0
  %243 = load i64, ptr %242, align 8, !tbaa !24
  store i64 %243, ptr %17, align 8, !tbaa !8
  %244 = getelementptr inbounds %"struct.std::pair", ptr %20, i32 0, i32 1
  %245 = load i64, ptr %244, align 8, !tbaa !26
  %246 = getelementptr inbounds %"struct.std::pair", ptr %19, i32 0, i32 1
  %247 = load i64, ptr %246, align 8, !tbaa !26
  %248 = sub nsw i64 %245, %247
  store i64 %248, ptr %18, align 8, !tbaa !8
  %249 = load i64, ptr %15, align 8, !tbaa !8
  %250 = getelementptr inbounds [200000 x i8], ptr @B, i64 0, i64 %249
  %251 = load i8, ptr %250, align 1, !tbaa !12, !range !16, !noundef !17
  %252 = trunc i8 %251 to i1
  br i1 %252, label %253, label %256

253:                                              ; preds = %241
  %254 = load i64, ptr %18, align 8, !tbaa !8
  %255 = add nsw i64 %254, 1
  store i64 %255, ptr %18, align 8, !tbaa !8
  br label %256

256:                                              ; preds = %253, %241
  %257 = load i64, ptr %16, align 8, !tbaa !8
  %258 = getelementptr inbounds [200000 x i8], ptr @B, i64 0, i64 %257
  %259 = load i8, ptr %258, align 1, !tbaa !12, !range !16, !noundef !17
  %260 = trunc i8 %259 to i1
  br i1 %260, label %261, label %264

261:                                              ; preds = %256
  %262 = load i64, ptr %18, align 8, !tbaa !8
  %263 = add nsw i64 %262, 1
  store i64 %263, ptr %18, align 8, !tbaa !8
  br label %264

264:                                              ; preds = %261, %256
  %265 = load i64, ptr %17, align 8, !tbaa !8
  %266 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %265)
          to label %267 unwind label %236

267:                                              ; preds = %264
  %268 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %266, i8 noundef signext 32)
          to label %269 unwind label %236

269:                                              ; preds = %267
  %270 = load i64, ptr %18, align 8, !tbaa !8
  %271 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %268, i64 noundef %270)
          to label %272 unwind label %236

272:                                              ; preds = %269
  %273 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %271, i8 noundef signext 10)
          to label %274 unwind label %236

274:                                              ; preds = %272
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, 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 %275

275:                                              ; preds = %274
  %276 = load i64, ptr %14, align 8, !tbaa !8
  %277 = add nsw i64 %276, 1
  store i64 %277, ptr %14, align 8, !tbaa !8
  br label %191, !llvm.loop !27

278:                                              ; preds = %236, %232
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %279

279:                                              ; preds = %278, %228
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %282

280:                                              ; preds = %195
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @_ZNSt5queueIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #8
  %281 = load i32, ptr %1, align 4
  ret i32 %281

282:                                              ; preds = %279, %184, %144, %138
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @_ZNSt5queueIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #8
  br label %283

283:                                              ; preds = %282
  %284 = load ptr, ptr %8, align 8
  %285 = load i32, ptr %9, align 4
  %286 = insertvalue { ptr, i32 } poison, ptr %284, 0
  %287 = insertvalue { ptr, i32 } %286, i32 %285, 1
  resume { ptr, i32 } %287
}

; 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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #4

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4lift4initExRA200000_xS1_S1_S1_(ptr noundef nonnull align 8 dereferenceable(128000168), i64 noundef, ptr noundef nonnull align 8 dereferenceable(1600000), ptr noundef nonnull align 8 dereferenceable(1600000), ptr noundef nonnull align 8 dereferenceable(1600000), ptr noundef nonnull align 8 dereferenceable(1600000)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZN4lift4qry1Exx(ptr noundef nonnull align 8 dereferenceable(128000168), i64 noundef, i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZN4lift4qry2Exx(ptr noundef nonnull align 8 dereferenceable(128000168), i64 noundef, i64 noundef) #3 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) #6

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #7 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 = { 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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { nounwind }
attributes #9 = { noreturn nounwind }

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

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


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"struct.std::pair" = type { i64, i64 }
%struct.lift = type { i64, [20 x [200000 x i64]], [20 x [200000 x i64]], [20 x [200000 x i64]], [20 x [200000 x i64]], [20 x i64] }
%"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::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" }
%"struct.std::_Deque_base<long long, std::allocator<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 }

@N = external dso_local global i64, align 8
@Q = external dso_local global i64, align 8
@_Z5T_strB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@_Z5B_strB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@B = external dso_local local_unnamed_addr global [200000 x i8], align 16
@T = external dso_local global [200000 x %"struct.std::pair"], align 16
@Li = external dso_local global [200000 x i64], align 16
@Ri = external dso_local global [200000 x i64], align 16
@L = external dso_local global [200000 x i64], align 16
@R = external dso_local global [200000 x i64], align 16
@pfx = external dso_local global [200000 x i64], align 16
@ppfx = external dso_local global [200000 x i64], align 16
@lif = external dso_local global %struct.lift, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [114 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [21 x i8], align 1
@_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::queue", align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %13 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) @Q)
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(32) @_Z5T_strB5cxx11)
  %16 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(32) @_Z5B_strB5cxx11)
  %17 = load i64, ptr @N, align 8, !tbaa !8
  %18 = icmp sgt i64 %17, 0
  br i1 %18, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %0
  %19 = load i8, ptr @B, align 16, !tbaa !11, !range !13, !noundef !14
  %20 = zext nneg i8 %19 to i64
  store i64 %20, ptr @pfx, align 16, !tbaa !8
  br label %._crit_edge60.thread

._crit_edge:                                      ; preds = %.lr.ph
  %21 = load i8, ptr @B, align 16, !tbaa !11, !range !13, !noundef !14
  %22 = zext nneg i8 %21 to i64
  store i64 %22, ptr @pfx, align 16, !tbaa !8
  %23 = icmp sgt i64 %33, 1
  br i1 %23, label %.lr.ph59.preheader, label %._crit_edge60.thread

.lr.ph59.preheader:                               ; preds = %._crit_edge
  %24 = add nsw i64 %33, -1
  %25 = add nsw i64 %33, -2
  %xtraiter = and i64 %24, 3
  %26 = icmp ult i64 %25, 3
  br i1 %26, label %._crit_edge60.unr-lcssa, label %.lr.ph59.preheader.new

.lr.ph59.preheader.new:                           ; preds = %.lr.ph59.preheader
  %unroll_iter = and i64 %24, -4
  br label %.lr.ph59

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.056 = phi i64 [ %32, %.lr.ph ], [ 0, %0 ]
  %27 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z5B_strB5cxx11, i64 noundef %.056)
  %28 = load i8, ptr %27, align 1, !tbaa !15
  %29 = icmp eq i8 %28, 49
  %30 = getelementptr inbounds [200000 x i8], ptr @B, i64 0, i64 %.056
  %31 = zext i1 %29 to i8
  store i8 %31, ptr %30, align 1, !tbaa !11
  %32 = add nuw nsw i64 %.056, 1
  %33 = load i64, ptr @N, align 8, !tbaa !8
  %34 = icmp slt i64 %32, %33
  br i1 %34, label %.lr.ph, label %._crit_edge, !llvm.loop !16

._crit_edge60.thread:                             ; preds = %._crit_edge.thread, %._crit_edge
  store i64 0, ptr @ppfx, align 16, !tbaa !8
  br label %._crit_edge64

._crit_edge60.unr-lcssa:                          ; preds = %.lr.ph59, %.lr.ph59.preheader
  %.unr = phi i64 [ %22, %.lr.ph59.preheader ], [ %66, %.lr.ph59 ]
  %.03457.unr = phi i64 [ 1, %.lr.ph59.preheader ], [ %68, %.lr.ph59 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge60, label %.lr.ph59.epil

.lr.ph59.epil:                                    ; preds = %._crit_edge60.unr-lcssa, %.lr.ph59.epil
  %35 = phi i64 [ %39, %.lr.ph59.epil ], [ %.unr, %._crit_edge60.unr-lcssa ]
  %.03457.epil = phi i64 [ %41, %.lr.ph59.epil ], [ %.03457.unr, %._crit_edge60.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph59.epil ], [ 0, %._crit_edge60.unr-lcssa ]
  %36 = getelementptr inbounds [200000 x i8], ptr @B, i64 0, i64 %.03457.epil
  %37 = load i8, ptr %36, align 1, !tbaa !11, !range !13, !noundef !14
  %38 = zext nneg i8 %37 to i64
  %39 = add nuw nsw i64 %35, %38
  %40 = getelementptr inbounds [200000 x i64], ptr @pfx, i64 0, i64 %.03457.epil
  store i64 %39, ptr %40, align 8, !tbaa !8
  %41 = add nuw nsw i64 %.03457.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_edge60, label %.lr.ph59.epil, !llvm.loop !18

._crit_edge60:                                    ; preds = %.lr.ph59.epil, %._crit_edge60.unr-lcssa
  store i64 0, ptr @ppfx, align 16, !tbaa !8
  br i1 %23, label %.lr.ph63.preheader, label %._crit_edge64

.lr.ph63.preheader:                               ; preds = %._crit_edge60
  %42 = shl i64 %33, 3
  %43 = add i64 %42, -8
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @ppfx, i64 8), ptr nonnull align 16 @pfx, i64 %43, i1 false), !tbaa !8
  br label %._crit_edge64

.lr.ph59:                                         ; preds = %.lr.ph59, %.lr.ph59.preheader.new
  %44 = phi i64 [ %22, %.lr.ph59.preheader.new ], [ %66, %.lr.ph59 ]
  %.03457 = phi i64 [ 1, %.lr.ph59.preheader.new ], [ %68, %.lr.ph59 ]
  %niter = phi i64 [ 0, %.lr.ph59.preheader.new ], [ %niter.next.3, %.lr.ph59 ]
  %45 = getelementptr inbounds [200000 x i8], ptr @B, i64 0, i64 %.03457
  %46 = load i8, ptr %45, align 1, !tbaa !11, !range !13, !noundef !14
  %47 = zext nneg i8 %46 to i64
  %48 = add nuw nsw i64 %44, %47
  %49 = getelementptr inbounds [200000 x i64], ptr @pfx, i64 0, i64 %.03457
  store i64 %48, ptr %49, align 8, !tbaa !8
  %50 = add nuw nsw i64 %.03457, 1
  %51 = getelementptr inbounds [200000 x i8], ptr @B, i64 0, i64 %50
  %52 = load i8, ptr %51, align 1, !tbaa !11, !range !13, !noundef !14
  %53 = zext nneg i8 %52 to i64
  %54 = add nuw nsw i64 %48, %53
  %55 = getelementptr inbounds [200000 x i64], ptr @pfx, i64 0, i64 %50
  store i64 %54, ptr %55, align 8, !tbaa !8
  %56 = add nuw nsw i64 %.03457, 2
  %57 = getelementptr inbounds [200000 x i8], ptr @B, i64 0, i64 %56
  %58 = load i8, ptr %57, align 1, !tbaa !11, !range !13, !noundef !14
  %59 = zext nneg i8 %58 to i64
  %60 = add nuw nsw i64 %54, %59
  %61 = getelementptr inbounds [200000 x i64], ptr @pfx, i64 0, i64 %56
  store i64 %60, ptr %61, align 8, !tbaa !8
  %62 = add nuw nsw i64 %.03457, 3
  %63 = getelementptr inbounds [200000 x i8], ptr @B, i64 0, i64 %62
  %64 = load i8, ptr %63, align 1, !tbaa !11, !range !13, !noundef !14
  %65 = zext nneg i8 %64 to i64
  %66 = add nuw nsw i64 %60, %65
  %67 = getelementptr inbounds [200000 x i64], ptr @pfx, i64 0, i64 %62
  store i64 %66, ptr %67, align 8, !tbaa !8
  %68 = add nuw nsw i64 %.03457, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge60.unr-lcssa, label %.lr.ph59, !llvm.loop !20

._crit_edge64:                                    ; preds = %._crit_edge60.thread, %.lr.ph63.preheader, %._crit_edge60
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %1) #9
  call void @_ZNSt5queueIxSt5dequeIxSaIxEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  store i64 0, ptr %2, align 8, !tbaa !8
  %69 = load i64, ptr @N, align 8, !tbaa !8
  %70 = icmp sgt i64 %69, 0
  br i1 %70, label %.lr.ph68, label %._crit_edge69

._crit_edge69:                                    ; preds = %90, %._crit_edge64
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  %71 = call noundef zeroext i1 @_ZNKSt5queueIxSt5dequeIxSaIxEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  br i1 %71, label %.preheader, label %96

.preheader:                                       ; preds = %._crit_edge69
  %72 = load i64, ptr @N, align 8, !tbaa !8
  %73 = icmp sgt i64 %72, 0
  br i1 %73, label %.lr.ph71, label %._crit_edge72

.lr.ph68:                                         ; preds = %._crit_edge64, %90
  %.03666 = phi i64 [ %.1, %90 ], [ 0, %._crit_edge64 ]
  %storemerge65 = phi i64 [ %92, %90 ], [ 0, %._crit_edge64 ]
  %74 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z5T_strB5cxx11, i64 noundef %storemerge65)
  %75 = load i8, ptr %74, align 1, !tbaa !15
  %76 = icmp eq i8 %75, 76
  br i1 %76, label %77, label %80

77:                                               ; preds = %.lr.ph68
  invoke void @_ZNSt5queueIxSt5dequeIxSaIxEEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %90 unwind label %78

78:                                               ; preds = %77
  %79 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  br label %171

80:                                               ; preds = %.lr.ph68
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5queueIxSt5dequeIxSaIxEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %82 = load i64, ptr %81, align 8, !tbaa !8
  store i64 %82, ptr %3, align 8, !tbaa !8
  call void @_ZNSt5queueIxSt5dequeIxSaIxEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %83 = load i64, ptr %3, align 8, !tbaa !8
  %84 = getelementptr inbounds [200000 x i64], ptr @Li, i64 0, i64 %.03666
  store i64 %83, ptr %84, align 8, !tbaa !8
  %85 = load i64, ptr %2, align 8, !tbaa !8
  %86 = getelementptr inbounds [200000 x i64], ptr @Ri, i64 0, i64 %.03666
  store i64 %85, ptr %86, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #9
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %87 = add nsw i64 %.03666, 1
  %88 = getelementptr inbounds [200000 x %"struct.std::pair"], ptr @T, i64 0, i64 %.03666
  %89 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %88, ptr noundef nonnull align 8 dereferenceable(16) %4) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  br label %90

90:                                               ; preds = %80, %77
  %.1 = phi i64 [ %.03666, %77 ], [ %87, %80 ]
  %91 = load i64, ptr %2, align 8, !tbaa !8
  %92 = add nsw i64 %91, 1
  store i64 %92, ptr %2, align 8, !tbaa !8
  %93 = load i64, ptr @N, align 8, !tbaa !8
  %94 = shl nsw i64 %93, 1
  %95 = icmp slt i64 %92, %94
  br i1 %95, label %.lr.ph68, label %._crit_edge69, !llvm.loop !21

96:                                               ; preds = %._crit_edge69
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.3, i32 noundef 118, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

._crit_edge72:                                    ; preds = %112, %.preheader
  %.lcssa = phi i64 [ %72, %.preheader ], [ %119, %112 ]
  call void @_ZN4lift4initExRA200000_xS1_S1_S1_(ptr noundef nonnull align 8 dereferenceable(128000168) @lif, i64 noundef %.lcssa, ptr noundef nonnull align 8 dereferenceable(1600000) @L, ptr noundef nonnull align 8 dereferenceable(1600000) @R, ptr noundef nonnull align 8 dereferenceable(1600000) @pfx, ptr noundef nonnull align 8 dereferenceable(1600000) @ppfx)
  %97 = load i64, ptr @Q, align 8, !tbaa !8
  %98 = icmp sgt i64 %97, 0
  br i1 %98, label %.lr.ph76, label %._crit_edge77

.lr.ph71:                                         ; preds = %.preheader, %112
  %99 = phi i64 [ %119, %112 ], [ %72, %.preheader ]
  %.04070 = phi i64 [ %118, %112 ], [ 0, %.preheader ]
  %100 = getelementptr inbounds i64, ptr @Ri, i64 %99
  %101 = getelementptr inbounds [200000 x i64], ptr @Li, i64 0, i64 %.04070
  %102 = invoke noundef ptr @_ZSt11upper_boundIPxxET_S1_S1_RKT0_(ptr noundef nonnull @Ri, ptr noundef nonnull %100, ptr noundef nonnull align 8 dereferenceable(8) %101)
          to label %103 unwind label %121

103:                                              ; preds = %.lr.ph71
  %104 = ptrtoint ptr %102 to i64
  %105 = sub i64 %104, ptrtoint (ptr @Ri to i64)
  %106 = ashr exact i64 %105, 3
  %107 = getelementptr inbounds [200000 x i64], ptr @L, i64 0, i64 %.04070
  store i64 %106, ptr %107, align 8, !tbaa !8
  %108 = load i64, ptr @N, align 8, !tbaa !8
  %109 = getelementptr inbounds i64, ptr @Li, i64 %108
  %110 = getelementptr inbounds [200000 x i64], ptr @Ri, i64 0, i64 %.04070
  %111 = invoke noundef ptr @_ZSt11upper_boundIPxxET_S1_S1_RKT0_(ptr noundef nonnull @Li, ptr noundef nonnull %109, ptr noundef nonnull align 8 dereferenceable(8) %110)
          to label %112 unwind label %121

112:                                              ; preds = %103
  %113 = ptrtoint ptr %111 to i64
  %114 = sub i64 %113, ptrtoint (ptr @Li to i64)
  %115 = ashr exact i64 %114, 3
  %116 = add nsw i64 %115, -1
  %117 = getelementptr inbounds [200000 x i64], ptr @R, i64 0, i64 %.04070
  store i64 %116, ptr %117, align 8, !tbaa !8
  %118 = add nuw nsw i64 %.04070, 1
  %119 = load i64, ptr @N, align 8, !tbaa !8
  %120 = icmp slt i64 %118, %119
  br i1 %120, label %.lr.ph71, label %._crit_edge72, !llvm.loop !22

121:                                              ; preds = %103, %.lr.ph71
  %122 = landingpad { ptr, i32 }
          cleanup
  br label %171

._crit_edge77:                                    ; preds = %166, %._crit_edge72
  call void @_ZNSt5queueIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %1) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %1) #9
  ret i32 0

.lr.ph76:                                         ; preds = %._crit_edge72, %166
  %.03974 = phi i64 [ %167, %166 ], [ 0, %._crit_edge72 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %123 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %124 unwind label %142

124:                                              ; preds = %.lr.ph76
  %125 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %123, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %126 unwind label %142

126:                                              ; preds = %124
  %127 = load i64, ptr %5, align 8, !tbaa !8
  %128 = add nsw i64 %127, -1
  store i64 %128, ptr %5, align 8, !tbaa !8
  %129 = load i64, ptr %6, align 8, !tbaa !8
  %130 = add nsw i64 %129, -1
  store i64 %130, ptr %6, align 8, !tbaa !8
  %131 = invoke { i64, i64 } @_ZN4lift4qry1Exx(ptr noundef nonnull align 8 dereferenceable(128000168) @lif, i64 noundef %128, i64 noundef %130)
          to label %132 unwind label %144

132:                                              ; preds = %126
  %133 = extractvalue { i64, i64 } %131, 0
  %134 = extractvalue { i64, i64 } %131, 1
  %135 = load i64, ptr %5, align 8, !tbaa !8
  %136 = load i64, ptr %6, align 8, !tbaa !8
  %137 = invoke { i64, i64 } @_ZN4lift4qry2Exx(ptr noundef nonnull align 8 dereferenceable(128000168) @lif, i64 noundef %135, i64 noundef %136)
          to label %138 unwind label %146

138:                                              ; preds = %132
  %139 = extractvalue { i64, i64 } %137, 0
  %140 = icmp eq i64 %133, %139
  br i1 %140, label %148, label %141

141:                                              ; preds = %138
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.3, i32 noundef 149, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

142:                                              ; preds = %124, %.lr.ph76
  %143 = landingpad { ptr, i32 }
          cleanup
  br label %170

144:                                              ; preds = %126
  %145 = landingpad { ptr, i32 }
          cleanup
  br label %170

146:                                              ; preds = %164, %162, %160, %148, %132
  %147 = landingpad { ptr, i32 }
          cleanup
  br label %170

148:                                              ; preds = %138
  %149 = extractvalue { i64, i64 } %137, 1
  %150 = sub i64 %149, %134
  %151 = load i64, ptr %5, align 8, !tbaa !8
  %152 = getelementptr inbounds [200000 x i8], ptr @B, i64 0, i64 %151
  %153 = load i8, ptr %152, align 1, !tbaa !11, !range !13, !noundef !14
  %154 = zext nneg i8 %153 to i64
  %spec.select = add nsw i64 %150, %154
  %155 = load i64, ptr %6, align 8, !tbaa !8
  %156 = getelementptr inbounds [200000 x i8], ptr @B, i64 0, i64 %155
  %157 = load i8, ptr %156, align 1, !tbaa !11, !range !13, !noundef !14
  %158 = zext nneg i8 %157 to i64
  %.138 = add nsw i64 %spec.select, %158
  %159 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %133)
          to label %160 unwind label %146

160:                                              ; preds = %148
  %161 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %159, i8 noundef signext 32)
          to label %162 unwind label %146

162:                                              ; preds = %160
  %163 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %161, i64 noundef %.138)
          to label %164 unwind label %146

164:                                              ; preds = %162
  %165 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %163, i8 noundef signext 10)
          to label %166 unwind label %146

166:                                              ; preds = %164
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  %167 = add nuw nsw i64 %.03974, 1
  %168 = load i64, ptr @Q, align 8, !tbaa !8
  %169 = icmp slt i64 %167, %168
  br i1 %169, label %.lr.ph76, label %._crit_edge77, !llvm.loop !23

170:                                              ; preds = %144, %146, %142
  %.pn.pn = phi { ptr, i32 } [ %143, %142 ], [ %147, %146 ], [ %145, %144 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  br label %171

171:                                              ; preds = %170, %121, %78
  %.pn52 = phi { ptr, i32 } [ %79, %78 ], [ %122, %121 ], [ %.pn.pn, %170 ]
  call void @_ZNSt5queueIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %1) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %1) #9
  resume { ptr, i32 } %.pn52
}

; 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

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

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

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

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #4

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4lift4initExRA200000_xS1_S1_S1_(ptr noundef nonnull align 8 dereferenceable(128000168), i64 noundef, ptr noundef nonnull align 8 dereferenceable(1600000), ptr noundef nonnull align 8 dereferenceable(1600000), ptr noundef nonnull align 8 dereferenceable(1600000), ptr noundef nonnull align 8 dereferenceable(1600000)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZN4lift4qry1Exx(ptr noundef nonnull align 8 dereferenceable(128000168), i64 noundef, i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZN4lift4qry2Exx(ptr noundef nonnull align 8 dereferenceable(128000168), i64 noundef, i64 noundef) local_unnamed_addr #3 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 #6

; 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 #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #7 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) #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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #9 = { nounwind }
attributes #10 = { noreturn nounwind }

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

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


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass