; LLVM IR from eyangch/competitive-programming :: Codeforces/1083 (e)

; 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"

%struct.Rect = type { i64, i64, 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.anon = type { i8 }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<Line, std::allocator<Line>>::_Deque_impl" }
%"struct.std::_Deque_base<Line, std::allocator<Line>>::_Deque_impl" = type { %"struct.std::_Deque_base<Line, std::allocator<Line>>::_Deque_impl_data" }
%"struct.std::_Deque_base<Line, std::allocator<Line>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%struct.Line = type { i64, i64 }

@N = external dso_local global i64, align 8
@R = external dso_local global [1000000 x %struct.Rect], align 16
@dp = external dso_local global [1000000 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 nounwind uwtable
declare dso_local noundef i64 @_Z5get_y4Linex(i64, i64, i64 noundef) #0

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

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

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

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

27:                                               ; preds = %45, %0
  %28 = load i64, ptr %2, align 8, !tbaa !8
  %29 = load i64, ptr @N, align 8, !tbaa !8
  %30 = icmp slt i64 %28, %29
  br i1 %30, label %32, label %31

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

32:                                               ; preds = %27
  %33 = load i64, ptr %2, align 8, !tbaa !8
  %34 = getelementptr inbounds [1000000 x %struct.Rect], ptr @R, i64 0, i64 %33
  %35 = getelementptr inbounds %struct.Rect, ptr %34, i32 0, i32 0
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %35)
  %37 = load i64, ptr %2, align 8, !tbaa !8
  %38 = getelementptr inbounds [1000000 x %struct.Rect], ptr @R, i64 0, i64 %37
  %39 = getelementptr inbounds %struct.Rect, ptr %38, i32 0, i32 1
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull align 8 dereferenceable(8) %39)
  %41 = load i64, ptr %2, align 8, !tbaa !8
  %42 = getelementptr inbounds [1000000 x %struct.Rect], ptr @R, i64 0, i64 %41
  %43 = getelementptr inbounds %struct.Rect, ptr %42, i32 0, i32 2
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 8 dereferenceable(8) %43)
  br label %45

45:                                               ; preds = %32
  %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 %27, !llvm.loop !11

48:                                               ; preds = %31
  %49 = load i64, ptr @N, align 8, !tbaa !8
  %50 = getelementptr inbounds %struct.Rect, ptr @R, i64 %49
  call void @"_ZSt4sortIP4RectZ4mainE3$_0EvT_S3_T0_"(ptr noundef @R, ptr noundef %50)
  call void @llvm.lifetime.start.p0(i64 80, ptr %4) #8
  call void @_ZNSt5dequeI4LineSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  store i64 0, ptr %5, align 8, !tbaa !8
  br label %51

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

55:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %196

56:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %57 = load i64, ptr %5, align 8, !tbaa !8
  %58 = getelementptr inbounds [1000000 x %struct.Rect], ptr @R, i64 0, i64 %57
  %59 = getelementptr inbounds %struct.Rect, ptr %58, i32 0, i32 1
  %60 = load i64, ptr %59, align 8, !tbaa !13
  store i64 %60, 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 %61

61:                                               ; preds = %84, %56
  %62 = call noundef i64 @_ZNKSt5dequeI4LineSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #8
  %63 = icmp uge i64 %62, 2
  br i1 %63, label %64, label %82

64:                                               ; preds = %61
  %65 = call noundef i64 @_ZNKSt5dequeI4LineSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #8
  %66 = sub i64 %65, 2
  %67 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5dequeI4LineSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %4, i64 noundef %66) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %67, i64 16, i1 false), !tbaa.struct !15
  %68 = load i64, ptr %6, align 8, !tbaa !8
  %69 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 0
  %70 = load i64, ptr %69, align 8
  %71 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 1
  %72 = load i64, ptr %71, align 8
  %73 = call noundef i64 @_Z5get_y4Linex(i64 %70, i64 %72, i64 noundef %68)
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5dequeI4LineSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %74, i64 16, i1 false), !tbaa.struct !15
  %75 = load i64, ptr %6, align 8, !tbaa !8
  %76 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 0
  %77 = load i64, ptr %76, align 8
  %78 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 1
  %79 = load i64, ptr %78, align 8
  %80 = call noundef i64 @_Z5get_y4Linex(i64 %77, i64 %79, i64 noundef %75)
  %81 = icmp sge i64 %73, %80
  br label %82

82:                                               ; preds = %64, %61
  %83 = phi i1 [ false, %61 ], [ %81, %64 ]
  br i1 %83, label %84, label %85

84:                                               ; preds = %82
  call void @_ZNSt5dequeI4LineSaIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #8
  br label %61, !llvm.loop !16

85:                                               ; preds = %82
  %86 = call noundef zeroext i1 @_ZNKSt5dequeI4LineSaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #8
  br i1 %86, label %102, label %87

87:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  store i64 0, ptr %10, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %88 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5dequeI4LineSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %88, i64 16, i1 false), !tbaa.struct !15
  %89 = load i64, ptr %6, align 8, !tbaa !8
  %90 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 0
  %91 = load i64, ptr %90, align 8
  %92 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 1
  %93 = load i64, ptr %92, align 8
  %94 = call noundef i64 @_Z5get_y4Linex(i64 %91, i64 %93, i64 noundef %89)
  store i64 %94, ptr %11, align 8, !tbaa !8
  %95 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %96 unwind label %98

96:                                               ; preds = %87
  %97 = load i64, ptr %95, align 8, !tbaa !8
  store i64 %97, ptr %7, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %102

98:                                               ; preds = %87
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %13, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %195

102:                                              ; preds = %96, %85
  %103 = load i64, ptr %5, align 8, !tbaa !8
  %104 = icmp sgt i64 %103, 0
  br i1 %104, label %105, label %112

105:                                              ; preds = %102
  %106 = load i64, ptr %5, align 8, !tbaa !8
  %107 = sub nsw i64 %106, 1
  %108 = getelementptr inbounds [1000000 x i64], ptr @dp, i64 0, i64 %107
  %109 = load i64, ptr %108, align 8, !tbaa !8
  %110 = load i64, ptr %5, align 8, !tbaa !8
  %111 = getelementptr inbounds [1000000 x i64], ptr @dp, i64 0, i64 %110
  store i64 %109, ptr %111, align 8, !tbaa !8
  br label %112

112:                                              ; preds = %105, %102
  %113 = load i64, ptr %5, align 8, !tbaa !8
  %114 = getelementptr inbounds [1000000 x i64], ptr @dp, i64 0, i64 %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %115 = load i64, ptr %5, align 8, !tbaa !8
  %116 = getelementptr inbounds [1000000 x %struct.Rect], ptr @R, i64 0, i64 %115
  %117 = getelementptr inbounds %struct.Rect, ptr %116, i32 0, i32 0
  %118 = load i64, ptr %117, align 8, !tbaa !17
  %119 = load i64, ptr %6, align 8, !tbaa !8
  %120 = mul nsw i64 %118, %119
  %121 = load i64, ptr %5, align 8, !tbaa !8
  %122 = getelementptr inbounds [1000000 x %struct.Rect], ptr @R, i64 0, i64 %121
  %123 = getelementptr inbounds %struct.Rect, ptr %122, i32 0, i32 2
  %124 = load i64, ptr %123, align 8, !tbaa !18
  %125 = sub nsw i64 %120, %124
  %126 = load i64, ptr %7, align 8, !tbaa !8
  %127 = add nsw i64 %125, %126
  store i64 %127, ptr %15, align 8, !tbaa !8
  %128 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %114, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %129 unwind label %178

129:                                              ; preds = %112
  %130 = load i64, ptr %128, align 8, !tbaa !8
  %131 = load i64, ptr %5, align 8, !tbaa !8
  %132 = getelementptr inbounds [1000000 x i64], ptr @dp, i64 0, i64 %131
  store i64 %130, ptr %132, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  %133 = load i64, ptr %7, align 8, !tbaa !8
  %134 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %133)
          to label %135 unwind label %182

135:                                              ; preds = %129
  %136 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %134, i8 noundef signext 32)
          to label %137 unwind label %182

137:                                              ; preds = %135
  %138 = load i64, ptr %5, align 8, !tbaa !8
  %139 = getelementptr inbounds [1000000 x i64], ptr @dp, i64 0, i64 %138
  %140 = load i64, ptr %139, align 8, !tbaa !8
  %141 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %136, i64 noundef %140)
          to label %142 unwind label %182

142:                                              ; preds = %137
  %143 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %141, i8 noundef signext 10)
          to label %144 unwind label %182

144:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #8
  %145 = getelementptr inbounds %struct.Line, ptr %16, i32 0, i32 0
  %146 = load i64, ptr %5, align 8, !tbaa !8
  %147 = getelementptr inbounds [1000000 x %struct.Rect], ptr @R, i64 0, i64 %146
  %148 = getelementptr inbounds %struct.Rect, ptr %147, i32 0, i32 0
  %149 = load i64, ptr %148, align 8, !tbaa !17
  %150 = sub nsw i64 0, %149
  store i64 %150, ptr %145, align 8, !tbaa !19
  %151 = getelementptr inbounds %struct.Line, ptr %16, i32 0, i32 1
  %152 = load i64, ptr %5, align 8, !tbaa !8
  %153 = getelementptr inbounds [1000000 x i64], ptr @dp, i64 0, i64 %152
  %154 = load i64, ptr %153, align 8, !tbaa !8
  store i64 %154, ptr %151, align 8, !tbaa !21
  br label %155

155:                                              ; preds = %177, %144
  %156 = call noundef i64 @_ZNKSt5dequeI4LineSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #8
  %157 = icmp uge i64 %156, 2
  br i1 %157, label %158, label %175

158:                                              ; preds = %155
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %16, i64 16, i1 false), !tbaa.struct !15
  %159 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5dequeI4LineSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %4, i64 noundef 0) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %159, i64 16, i1 false), !tbaa.struct !15
  %160 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5dequeI4LineSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %4, i64 noundef 1) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %160, i64 16, i1 false), !tbaa.struct !15
  %161 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 0
  %162 = load i64, ptr %161, align 8
  %163 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 1
  %164 = load i64, ptr %163, align 8
  %165 = getelementptr inbounds { i64, i64 }, ptr %18, i32 0, i32 0
  %166 = load i64, ptr %165, align 8
  %167 = getelementptr inbounds { i64, i64 }, ptr %18, i32 0, i32 1
  %168 = load i64, ptr %167, align 8
  %169 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 0
  %170 = load i64, ptr %169, align 8
  %171 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 1
  %172 = load i64, ptr %171, align 8
  %173 = call noundef zeroext i1 @_Z4isct4LineS_S_(i64 %162, i64 %164, i64 %166, i64 %168, i64 %170, i64 %172)
  %174 = xor i1 %173, true
  br label %175

175:                                              ; preds = %158, %155
  %176 = phi i1 [ false, %155 ], [ %174, %158 ]
  br i1 %176, label %177, label %186

177:                                              ; preds = %175
  call void @_ZNSt5dequeI4LineSaIS0_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #8
  br label %155, !llvm.loop !22

178:                                              ; preds = %112
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %13, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %195

182:                                              ; preds = %142, %137, %135, %129
  %183 = landingpad { ptr, i32 }
          cleanup
  %184 = extractvalue { ptr, i32 } %183, 0
  store ptr %184, ptr %13, align 8
  %185 = extractvalue { ptr, i32 } %183, 1
  store i32 %185, ptr %14, align 4
  br label %195

186:                                              ; preds = %175
  invoke void @_ZNSt5dequeI4LineSaIS0_EE10push_frontERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %187 unwind label %191

187:                                              ; preds = %186
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %188

188:                                              ; preds = %187
  %189 = load i64, ptr %5, align 8, !tbaa !8
  %190 = add nsw i64 %189, 1
  store i64 %190, ptr %5, align 8, !tbaa !8
  br label %51, !llvm.loop !23

191:                                              ; preds = %186
  %192 = landingpad { ptr, i32 }
          cleanup
  %193 = extractvalue { ptr, i32 } %192, 0
  store ptr %193, ptr %13, align 8
  %194 = extractvalue { ptr, i32 } %192, 1
  store i32 %194, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #8
  br label %195

195:                                              ; preds = %191, %182, %178, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %210

196:                                              ; preds = %55
  %197 = load i64, ptr @N, align 8, !tbaa !8
  %198 = sub nsw i64 %197, 1
  %199 = getelementptr inbounds [1000000 x i64], ptr @dp, i64 0, i64 %198
  %200 = load i64, ptr %199, align 8, !tbaa !8
  %201 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %200)
          to label %202 unwind label %206

202:                                              ; preds = %196
  %203 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %201, i8 noundef signext 10)
          to label %204 unwind label %206

204:                                              ; preds = %202
  call void @_ZNSt5dequeI4LineSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr %4) #8
  %205 = load i32, ptr %1, align 4
  ret i32 %205

206:                                              ; preds = %202, %196
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %13, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %14, align 4
  br label %210

210:                                              ; preds = %206, %195
  call void @_ZNSt5dequeI4LineSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr %4) #8
  br label %211

211:                                              ; preds = %210
  %212 = load ptr, ptr %13, align 8
  %213 = load i32, ptr %14, align 4
  %214 = insertvalue { ptr, i32 } poison, ptr %212, 0
  %215 = insertvalue { ptr, i32 } %214, i32 %213, 1
  resume { ptr, i32 } %215
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIP4RectZ4mainE3$_0EvT_S3_T0_"(ptr noundef, ptr noundef) #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5dequeI4LineSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(80), i64 noundef) #0 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

!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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !9, i64 8}
!14 = !{!"_ZTS4Rect", !9, i64 0, !9, i64 8, !9, i64 16}
!15 = !{i64 0, i64 8, !8, i64 8, i64 8, !8}
!16 = distinct !{!16, !12}
!17 = !{!14, !9, i64 0}
!18 = !{!14, !9, i64 16}
!19 = !{!20, !9, i64 0}
!20 = !{!"_ZTS4Line", !9, i64 0, !9, i64 8}
!21 = !{!20, !9, i64 8}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}


; 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"

%struct.Rect = type { i64, i64, 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::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<Line, std::allocator<Line>>::_Deque_impl" }
%"struct.std::_Deque_base<Line, std::allocator<Line>>::_Deque_impl" = type { %"struct.std::_Deque_base<Line, std::allocator<Line>>::_Deque_impl_data" }
%"struct.std::_Deque_base<Line, std::allocator<Line>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%struct.Line = type { i64, i64 }

@N = external dso_local global i64, align 8
@R = external dso_local global [1000000 x %struct.Rect], align 16
@dp = external dso_local global [1000000 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 nounwind uwtable
declare dso_local noundef i64 @_Z5get_y4Linex(i64, i64, i64 noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::deque", align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %struct.Line, align 8
  %6 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %7 = getelementptr i8, ptr %6, i64 -24
  %8 = load i64, ptr %7, align 8
  %9 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %8
  %10 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %9, ptr noundef null)
  %11 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %12 = 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)
  %13 = load i64, ptr @N, align 8, !tbaa !8
  %14 = icmp sgt i64 %13, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.lcssa50 = phi i64 [ %13, %0 ], [ %26, %.lr.ph ]
  %15 = getelementptr inbounds %struct.Rect, ptr @R, i64 %.lcssa50
  tail call void @"_ZSt4sortIP4RectZ4mainE3$_0EvT_S3_T0_"(ptr noundef nonnull @R, ptr noundef nonnull %15)
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %1) #7
  call void @_ZNSt5dequeI4LineSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %16 = load i64, ptr @N, align 8, !tbaa !8
  %17 = icmp sgt i64 %16, 0
  br i1 %17, label %.lr.ph60, label %._crit_edge61

.lr.ph60:                                         ; preds = %._crit_edge
  %18 = getelementptr inbounds i8, ptr %5, i64 8
  br label %32

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.051 = phi i64 [ %25, %.lr.ph ], [ 0, %0 ]
  %19 = getelementptr inbounds [1000000 x %struct.Rect], ptr @R, i64 0, i64 %.051
  %20 = 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) %19)
  %21 = getelementptr inbounds i8, ptr %19, i64 8
  %22 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(8) %21)
  %23 = getelementptr inbounds i8, ptr %19, i64 16
  %24 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(8) %23)
  %25 = add nuw nsw i64 %.051, 1
  %26 = load i64, ptr @N, align 8, !tbaa !8
  %27 = icmp slt i64 %25, %26
  br i1 %27, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge61:                                    ; preds = %91, %._crit_edge
  %.lcssa = phi i64 [ %16, %._crit_edge ], [ %93, %91 ]
  %28 = add nsw i64 %.lcssa, -1
  %29 = getelementptr inbounds [1000000 x i64], ptr @dp, i64 0, i64 %28
  %30 = load i64, ptr %29, align 8, !tbaa !8
  %31 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %30)
          to label %97 unwind label %100

32:                                               ; preds = %.lr.ph60, %91
  %.03858 = phi i64 [ 0, %.lr.ph60 ], [ %92, %91 ]
  %33 = getelementptr inbounds [1000000 x %struct.Rect], ptr @R, i64 0, i64 %.03858
  %34 = getelementptr inbounds i8, ptr %33, i64 8
  %35 = load i64, ptr %34, align 8, !tbaa !13
  %36 = call noundef i64 @_ZNKSt5dequeI4LineSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #7
  %37 = icmp ugt i64 %36, 1
  br i1 %37, label %.lr.ph53, label %.critedge

.lr.ph53:                                         ; preds = %32, %44
  %38 = call noundef i64 @_ZNKSt5dequeI4LineSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #7
  %39 = add i64 %38, -2
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5dequeI4LineSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %1, i64 noundef %39) #7
  %.sroa.011.0.copyload = load i64, ptr %40, align 8, !tbaa !8
  %.sroa.212.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 8
  %.sroa.212.0.copyload = load i64, ptr %.sroa.212.0..sroa_idx, align 8, !tbaa !8
  %41 = call noundef i64 @_Z5get_y4Linex(i64 %.sroa.011.0.copyload, i64 %.sroa.212.0.copyload, i64 noundef %35)
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5dequeI4LineSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #7
  %.sroa.09.0.copyload = load i64, ptr %42, align 8, !tbaa !8
  %.sroa.210.0..sroa_idx = getelementptr inbounds i8, ptr %42, i64 8
  %.sroa.210.0.copyload = load i64, ptr %.sroa.210.0..sroa_idx, align 8, !tbaa !8
  %43 = call noundef i64 @_Z5get_y4Linex(i64 %.sroa.09.0.copyload, i64 %.sroa.210.0.copyload, i64 noundef %35)
  %.not = icmp slt i64 %41, %43
  br i1 %.not, label %.critedge, label %44

44:                                               ; preds = %.lr.ph53
  call void @_ZNSt5dequeI4LineSaIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #7
  %45 = call noundef i64 @_ZNKSt5dequeI4LineSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #7
  %46 = icmp ugt i64 %45, 1
  br i1 %46, label %.lr.ph53, label %.critedge, !llvm.loop !15

.critedge:                                        ; preds = %.lr.ph53, %44, %32
  %47 = call noundef zeroext i1 @_ZNKSt5dequeI4LineSaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #7
  br i1 %47, label %53, label %48

48:                                               ; preds = %.critedge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  store i64 0, ptr %2, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5dequeI4LineSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #7
  %.sroa.07.0.copyload = load i64, ptr %49, align 8, !tbaa !8
  %.sroa.28.0..sroa_idx = getelementptr inbounds i8, ptr %49, i64 8
  %.sroa.28.0.copyload = load i64, ptr %.sroa.28.0..sroa_idx, align 8, !tbaa !8
  %50 = call noundef i64 @_Z5get_y4Linex(i64 %.sroa.07.0.copyload, i64 %.sroa.28.0.copyload, i64 noundef %35)
  store i64 %50, ptr %3, align 8, !tbaa !8
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %52 = load i64, ptr %51, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  br label %53

53:                                               ; preds = %48, %.critedge
  %.039 = phi i64 [ 0, %.critedge ], [ %52, %48 ]
  %.not45 = icmp eq i64 %.03858, 0
  br i1 %.not45, label %59, label %54

54:                                               ; preds = %53
  %55 = add nsw i64 %.03858, -1
  %56 = getelementptr inbounds [1000000 x i64], ptr @dp, i64 0, i64 %55
  %57 = load i64, ptr %56, align 8, !tbaa !8
  %58 = getelementptr inbounds [1000000 x i64], ptr @dp, i64 0, i64 %.03858
  store i64 %57, ptr %58, align 8, !tbaa !8
  br label %59

59:                                               ; preds = %54, %53
  %60 = getelementptr inbounds [1000000 x i64], ptr @dp, i64 0, i64 %.03858
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %61 = load i64, ptr %33, align 8, !tbaa !16
  %62 = mul nsw i64 %61, %35
  %63 = getelementptr inbounds i8, ptr %33, i64 16
  %64 = load i64, ptr %63, align 8, !tbaa !17
  %65 = sub i64 %.039, %64
  %66 = add i64 %65, %62
  store i64 %66, ptr %4, align 8, !tbaa !8
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %68 = load i64, ptr %67, align 8, !tbaa !8
  store i64 %68, ptr %60, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %69 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.039)
          to label %70 unwind label %89

70:                                               ; preds = %59
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %69, i8 noundef signext 32)
          to label %72 unwind label %89

72:                                               ; preds = %70
  %73 = load i64, ptr %60, align 8, !tbaa !8
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %71, i64 noundef %73)
          to label %75 unwind label %89

75:                                               ; preds = %72
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %74, i8 noundef signext 10)
          to label %77 unwind label %89

77:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  %78 = load i64, ptr %33, align 8, !tbaa !16
  %79 = sub nsw i64 0, %78
  store i64 %79, ptr %5, align 8, !tbaa !18
  %80 = load i64, ptr %60, align 8, !tbaa !8
  store i64 %80, ptr %18, align 8, !tbaa !20
  %81 = call noundef i64 @_ZNKSt5dequeI4LineSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #7
  %82 = icmp ugt i64 %81, 1
  br i1 %82, label %.lr.ph56, label %.critedge2

.lr.ph56:                                         ; preds = %77, %86
  %.sroa.05.0.copyload = load i64, ptr %5, align 8, !tbaa !8
  %.sroa.26.0.copyload = load i64, ptr %18, align 8, !tbaa !8
  %83 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5dequeI4LineSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %1, i64 noundef 0) #7
  %.sroa.03.0.copyload = load i64, ptr %83, align 8, !tbaa !8
  %.sroa.24.0..sroa_idx = getelementptr inbounds i8, ptr %83, i64 8
  %.sroa.24.0.copyload = load i64, ptr %.sroa.24.0..sroa_idx, align 8, !tbaa !8
  %84 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5dequeI4LineSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(80) %1, i64 noundef 1) #7
  %.sroa.0.0.copyload = load i64, ptr %84, align 8, !tbaa !8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %84, i64 8
  %.sroa.2.0.copyload = load i64, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !8
  %85 = call noundef zeroext i1 @_Z4isct4LineS_S_(i64 %.sroa.05.0.copyload, i64 %.sroa.26.0.copyload, i64 %.sroa.03.0.copyload, i64 %.sroa.24.0.copyload, i64 %.sroa.0.0.copyload, i64 %.sroa.2.0.copyload)
  br i1 %85, label %.critedge2, label %86

86:                                               ; preds = %.lr.ph56
  call void @_ZNSt5dequeI4LineSaIS0_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #7
  %87 = call noundef i64 @_ZNKSt5dequeI4LineSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #7
  %88 = icmp ugt i64 %87, 1
  br i1 %88, label %.lr.ph56, label %.critedge2, !llvm.loop !21

89:                                               ; preds = %75, %72, %70, %59
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %102

.critedge2:                                       ; preds = %.lr.ph56, %86, %77
  invoke void @_ZNSt5dequeI4LineSaIS0_EE10push_frontERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %91 unwind label %95

91:                                               ; preds = %.critedge2
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  %92 = add nuw nsw i64 %.03858, 1
  %93 = load i64, ptr @N, align 8, !tbaa !8
  %94 = icmp slt i64 %92, %93
  br i1 %94, label %32, label %._crit_edge61, !llvm.loop !22

95:                                               ; preds = %.critedge2
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  br label %102

97:                                               ; preds = %._crit_edge61
  %98 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %31, i8 noundef signext 10)
          to label %99 unwind label %100

99:                                               ; preds = %97
  call void @_ZNSt5dequeI4LineSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %1) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %1) #7
  ret i32 0

100:                                              ; preds = %97, %._crit_edge61
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %102

102:                                              ; preds = %89, %95, %100
  %.pn.pn = phi { ptr, i32 } [ %101, %100 ], [ %96, %95 ], [ %90, %89 ]
  call void @_ZNSt5dequeI4LineSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %1) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn.pn
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIP4RectZ4mainE3$_0EvT_S3_T0_"(ptr noundef, ptr noundef) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5dequeI4LineSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(80), i64 noundef) local_unnamed_addr #0 align 2

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !9, i64 8}
!14 = !{!"_ZTS4Rect", !9, i64 0, !9, i64 8, !9, i64 16}
!15 = distinct !{!15, !12}
!16 = !{!14, !9, i64 0}
!17 = !{!14, !9, i64 16}
!18 = !{!19, !9, i64 0}
!19 = !{!"_ZTS4Line", !9, i64 0, !9, i64 8}
!20 = !{!19, !9, i64 8}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}


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