; LLVM IR from Tunghohin/Competitive_Coding :: Codeforces/cf1734_D.ll (Z5solvev)

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

@a = external dso_local global [200010 x i64], align 16
@GL = external dso_local global %"class.std::queue", align 8
@GR = external dso_local global %"class.std::queue", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca i64, align 8
  %14 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store i64 1, ptr %3, align 8, !tbaa !5
  br label %17

17:                                               ; preds = %26, %0
  %18 = load i64, ptr %3, align 8, !tbaa !5
  %19 = load i64, ptr %1, align 8, !tbaa !5
  %20 = icmp sle i64 %18, %19
  br i1 %20, label %22, label %21

21:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %29

22:                                               ; preds = %17
  %23 = load i64, ptr %3, align 8, !tbaa !5
  %24 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %23
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %24)
  br label %26

26:                                               ; preds = %22
  %27 = load i64, ptr %3, align 8, !tbaa !5
  %28 = add nsw i64 %27, 1
  store i64 %28, ptr %3, align 8, !tbaa !5
  br label %17, !llvm.loop !9

29:                                               ; preds = %21
  %30 = load i64, ptr %2, align 8, !tbaa !5
  %31 = icmp eq i64 %30, 1
  br i1 %31, label %36, label %32

32:                                               ; preds = %29
  %33 = load i64, ptr %2, align 8, !tbaa !5
  %34 = load i64, ptr %1, align 8, !tbaa !5
  %35 = icmp eq i64 %33, %34
  br i1 %35, label %36, label %38

36:                                               ; preds = %32, %29
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  store i32 1, ptr %4, align 4
  br label %170

38:                                               ; preds = %32
  br label %39

39:                                               ; preds = %42, %38
  %40 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @GL)
  %41 = xor i1 %40, true
  br i1 %41, label %42, label %43

42:                                               ; preds = %39
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) @GL)
  br label %39, !llvm.loop !11

43:                                               ; preds = %39
  br label %44

44:                                               ; preds = %47, %43
  %45 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @GR)
  %46 = xor i1 %45, true
  br i1 %46, label %47, label %48

47:                                               ; preds = %44
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) @GR)
  br label %44, !llvm.loop !12

48:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %49 = load i64, ptr %2, align 8, !tbaa !5
  %50 = add nsw i64 %49, 1
  store i64 %50, ptr %5, align 8, !tbaa !5
  br label %51

51:                                               ; preds = %80, %48
  %52 = load i64, ptr %5, align 8, !tbaa !5
  %53 = load i64, ptr %1, align 8, !tbaa !5
  %54 = icmp sle i64 %52, %53
  br i1 %54, label %56, label %55

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

56:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %57 = load i64, ptr %5, align 8, !tbaa !5
  %58 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %57
  %59 = load i64, ptr %58, align 8, !tbaa !5
  store i64 %59, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %60 = load i64, ptr %6, align 8, !tbaa !5
  store i64 %60, ptr %7, align 8, !tbaa !5
  br label %61

61:                                               ; preds = %70, %56
  %62 = load i64, ptr %6, align 8, !tbaa !5
  %63 = icmp slt i64 %62, 0
  br i1 %63, label %64, label %68

64:                                               ; preds = %61
  %65 = load i64, ptr %5, align 8, !tbaa !5
  %66 = load i64, ptr %1, align 8, !tbaa !5
  %67 = icmp slt i64 %65, %66
  br label %68

68:                                               ; preds = %64, %61
  %69 = phi i1 [ false, %61 ], [ %67, %64 ]
  br i1 %69, label %70, label %79

70:                                               ; preds = %68
  %71 = load i64, ptr %5, align 8, !tbaa !5
  %72 = add nsw i64 %71, 1
  store i64 %72, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %72
  %74 = load i64, ptr %73, align 8, !tbaa !5
  %75 = load i64, ptr %6, align 8, !tbaa !5
  %76 = add nsw i64 %75, %74
  store i64 %76, ptr %6, align 8, !tbaa !5
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %78 = load i64, ptr %77, align 8, !tbaa !5
  store i64 %78, ptr %7, align 8, !tbaa !5
  br label %61, !llvm.loop !13

79:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #5
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @GR, ptr noundef nonnull align 8 dereferenceable(16) %8)
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %80

80:                                               ; preds = %79
  %81 = load i64, ptr %5, align 8, !tbaa !5
  %82 = add nsw i64 %81, 1
  store i64 %82, ptr %5, align 8, !tbaa !5
  br label %51, !llvm.loop !14

83:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %84 = load i64, ptr %2, align 8, !tbaa !5
  %85 = sub nsw i64 %84, 1
  store i64 %85, ptr %9, align 8, !tbaa !5
  br label %86

86:                                               ; preds = %113, %83
  %87 = load i64, ptr %9, align 8, !tbaa !5
  %88 = icmp sge i64 %87, 1
  br i1 %88, label %90, label %89

89:                                               ; preds = %86
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %116

90:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %91 = load i64, ptr %9, align 8, !tbaa !5
  %92 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %91
  %93 = load i64, ptr %92, align 8, !tbaa !5
  store i64 %93, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %94 = load i64, ptr %10, align 8, !tbaa !5
  store i64 %94, ptr %11, align 8, !tbaa !5
  br label %95

95:                                               ; preds = %103, %90
  %96 = load i64, ptr %10, align 8, !tbaa !5
  %97 = icmp slt i64 %96, 0
  br i1 %97, label %98, label %101

98:                                               ; preds = %95
  %99 = load i64, ptr %9, align 8, !tbaa !5
  %100 = icmp sgt i64 %99, 1
  br label %101

101:                                              ; preds = %98, %95
  %102 = phi i1 [ false, %95 ], [ %100, %98 ]
  br i1 %102, label %103, label %112

103:                                              ; preds = %101
  %104 = load i64, ptr %9, align 8, !tbaa !5
  %105 = add nsw i64 %104, -1
  store i64 %105, ptr %9, align 8, !tbaa !5
  %106 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %105
  %107 = load i64, ptr %106, align 8, !tbaa !5
  %108 = load i64, ptr %10, align 8, !tbaa !5
  %109 = add nsw i64 %108, %107
  store i64 %109, ptr %10, align 8, !tbaa !5
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %111 = load i64, ptr %110, align 8, !tbaa !5
  store i64 %111, ptr %11, align 8, !tbaa !5
  br label %95, !llvm.loop !15

112:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #5
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @GL, ptr noundef nonnull align 8 dereferenceable(16) %12)
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %113

113:                                              ; preds = %112
  %114 = load i64, ptr %9, align 8, !tbaa !5
  %115 = add nsw i64 %114, -1
  store i64 %115, ptr %9, align 8, !tbaa !5
  br label %86, !llvm.loop !16

116:                                              ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %117 = load i64, ptr %2, align 8, !tbaa !5
  %118 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %117
  %119 = load i64, ptr %118, align 8, !tbaa !5
  store i64 %119, ptr %13, align 8, !tbaa !5
  br label %120

120:                                              ; preds = %160, %116
  %121 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @GR)
  br i1 %121, label %125, label %122

122:                                              ; preds = %120
  %123 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @GL)
  %124 = xor i1 %123, true
  br label %125

125:                                              ; preds = %122, %120
  %126 = phi i1 [ false, %120 ], [ %124, %122 ]
  br i1 %126, label %127, label %161

127:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  store i8 0, ptr %14, align 1, !tbaa !17
  %128 = load i64, ptr %13, align 8, !tbaa !5
  %129 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) @GL)
  %130 = getelementptr inbounds %"struct.std::pair", ptr %129, i32 0, i32 1
  %131 = load i64, ptr %130, align 8, !tbaa !19
  %132 = add nsw i64 %128, %131
  %133 = icmp sge i64 %132, 0
  br i1 %133, label %134, label %140

134:                                              ; preds = %127
  %135 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) @GL)
  %136 = getelementptr inbounds %"struct.std::pair", ptr %135, i32 0, i32 0
  %137 = load i64, ptr %136, align 8, !tbaa !21
  %138 = load i64, ptr %13, align 8, !tbaa !5
  %139 = add nsw i64 %138, %137
  store i64 %139, ptr %13, align 8, !tbaa !5
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) @GL)
  store i8 1, ptr %14, align 1, !tbaa !17
  br label %140

140:                                              ; preds = %134, %127
  %141 = load i64, ptr %13, align 8, !tbaa !5
  %142 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) @GR)
  %143 = getelementptr inbounds %"struct.std::pair", ptr %142, i32 0, i32 1
  %144 = load i64, ptr %143, align 8, !tbaa !19
  %145 = add nsw i64 %141, %144
  %146 = icmp sge i64 %145, 0
  br i1 %146, label %147, label %153

147:                                              ; preds = %140
  %148 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) @GR)
  %149 = getelementptr inbounds %"struct.std::pair", ptr %148, i32 0, i32 0
  %150 = load i64, ptr %149, align 8, !tbaa !21
  %151 = load i64, ptr %13, align 8, !tbaa !5
  %152 = add nsw i64 %151, %150
  store i64 %152, ptr %13, align 8, !tbaa !5
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) @GR)
  store i8 1, ptr %14, align 1, !tbaa !17
  br label %153

153:                                              ; preds = %147, %140
  %154 = load i8, ptr %14, align 1, !tbaa !17, !range !22, !noundef !23
  %155 = trunc i8 %154 to i1
  br i1 %155, label %157, label %156

156:                                              ; preds = %153
  store i32 20, ptr %4, align 4
  br label %158

157:                                              ; preds = %153
  store i32 0, ptr %4, align 4
  br label %158

158:                                              ; preds = %157, %156
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  %159 = load i32, ptr %4, align 4
  switch i32 %159, label %173 [
    i32 0, label %160
    i32 20, label %161
  ]

160:                                              ; preds = %158
  br label %120, !llvm.loop !24

161:                                              ; preds = %158, %125
  %162 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @GL)
  br i1 %162, label %165, label %163

163:                                              ; preds = %161
  %164 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @GR)
  br i1 %164, label %165, label %167

165:                                              ; preds = %163, %161
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %169

167:                                              ; preds = %163
  %168 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  br label %169

169:                                              ; preds = %167, %165
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  store i32 0, ptr %4, align 4
  br label %170

170:                                              ; preds = %169, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  %171 = load i32, ptr %4, align 4
  switch i32 %171, label %173 [
    i32 0, label %172
    i32 1, label %172
  ]

172:                                              ; preds = %170, %170
  ret void

173:                                              ; preds = %170, %158
  unreachable
}

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

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

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

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

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

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

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

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

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

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


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

@a = external dso_local global [200010 x i64], align 16
@GL = external dso_local global %"class.std::queue", align 8
@GR = external dso_local global %"class.std::queue", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"struct.std::pair", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %11 = load i64, ptr %1, align 8, !tbaa !5
  %.not34 = icmp slt i64 %11, 1
  br i1 %.not34, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.lcssa = phi i64 [ %11, %0 ], [ %19, %.lr.ph ]
  %12 = load i64, ptr %2, align 8, !tbaa !5
  %13 = icmp eq i64 %12, 1
  %14 = icmp eq i64 %12, %.lcssa
  %or.cond = or i1 %13, %14
  br i1 %or.cond, label %93, label %.preheader33

.preheader33:                                     ; preds = %._crit_edge
  %15 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @GL)
  br i1 %15, label %.preheader, label %.lr.ph36

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.02635 = phi i64 [ %18, %.lr.ph ], [ 1, %0 ]
  %16 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %.02635
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %18 = add nuw nsw i64 %.02635, 1
  %19 = load i64, ptr %1, align 8, !tbaa !5
  %.not.not = icmp slt i64 %.02635, %19
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader:                                       ; preds = %.lr.ph36, %.preheader33
  %20 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @GR)
  br i1 %20, label %._crit_edge38, label %.lr.ph37

.lr.ph36:                                         ; preds = %.preheader33, %.lr.ph36
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) @GL)
  %21 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @GL)
  br i1 %21, label %.preheader, label %.lr.ph36, !llvm.loop !11

.lr.ph37:                                         ; preds = %.preheader, %.lr.ph37
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) @GR)
  %22 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @GR)
  br i1 %22, label %._crit_edge38, label %.lr.ph37, !llvm.loop !12

._crit_edge38:                                    ; preds = %.lr.ph37, %.preheader
  %23 = load i64, ptr %2, align 8, !tbaa !5
  %24 = load i64, ptr %1, align 8
  %.not31.not44 = icmp slt i64 %23, %24
  br i1 %.not31.not44, label %.lr.ph47, label %._crit_edge48

._crit_edge48.loopexit:                           ; preds = %._crit_edge42
  %.pre = load i64, ptr %2, align 8, !tbaa !5
  br label %._crit_edge48

._crit_edge48:                                    ; preds = %._crit_edge48.loopexit, %._crit_edge38
  %25 = phi i64 [ %.pre, %._crit_edge48.loopexit ], [ %23, %._crit_edge38 ]
  %26 = icmp sgt i64 %25, 1
  br i1 %26, label %.lr.ph56, label %._crit_edge57

.lr.ph47:                                         ; preds = %._crit_edge38, %._crit_edge42
  %27 = phi i64 [ %45, %._crit_edge42 ], [ %24, %._crit_edge38 ]
  %.023.in45 = phi i64 [ %.124.lcssa, %._crit_edge42 ], [ %23, %._crit_edge38 ]
  %.023 = add nsw i64 %.023.in45, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %28 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %.023
  %29 = load i64, ptr %28, align 8, !tbaa !5
  store i64 %29, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  store i64 %29, ptr %4, align 8, !tbaa !5
  %30 = icmp slt i64 %29, 0
  %31 = icmp slt i64 %.023, %27
  %32 = and i1 %30, %31
  br i1 %32, label %.lr.ph41, label %._crit_edge42

.lr.ph41:                                         ; preds = %.lr.ph47, %.lr.ph41
  %33 = phi i64 [ %40, %.lr.ph41 ], [ %29, %.lr.ph47 ]
  %.12439 = phi i64 [ %34, %.lr.ph41 ], [ %.023, %.lr.ph47 ]
  %34 = add nsw i64 %.12439, 1
  %35 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %34
  %36 = load i64, ptr %35, align 8, !tbaa !5
  %37 = add nsw i64 %36, %33
  store i64 %37, ptr %3, align 8, !tbaa !5
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %39 = load i64, ptr %38, align 8, !tbaa !5
  store i64 %39, ptr %4, align 8, !tbaa !5
  %40 = load i64, ptr %3, align 8, !tbaa !5
  %41 = icmp slt i64 %40, 0
  %42 = load i64, ptr %1, align 8
  %43 = icmp slt i64 %34, %42
  %44 = select i1 %41, i1 %43, i1 false
  br i1 %44, label %.lr.ph41, label %._crit_edge42, !llvm.loop !13

._crit_edge42:                                    ; preds = %.lr.ph41, %.lr.ph47
  %.124.lcssa = phi i64 [ %.023, %.lr.ph47 ], [ %34, %.lr.ph41 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @GR, ptr noundef nonnull align 8 dereferenceable(16) %5)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  %45 = load i64, ptr %1, align 8
  %.not31.not = icmp slt i64 %.124.lcssa, %45
  br i1 %.not31.not, label %.lr.ph47, label %._crit_edge48.loopexit, !llvm.loop !14

._crit_edge57.loopexit:                           ; preds = %._crit_edge52
  %.pre66 = load i64, ptr %2, align 8, !tbaa !5
  br label %._crit_edge57

._crit_edge57:                                    ; preds = %._crit_edge57.loopexit, %._crit_edge48
  %46 = phi i64 [ %.pre66, %._crit_edge57.loopexit ], [ %25, %._crit_edge48 ]
  %47 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %46
  %48 = load i64, ptr %47, align 8, !tbaa !5
  %49 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @GR)
  br i1 %49, label %.critedge, label %.lr.ph60

.lr.ph56:                                         ; preds = %._crit_edge48, %._crit_edge52
  %.021.in54 = phi i64 [ %.122.lcssa, %._crit_edge52 ], [ %25, %._crit_edge48 ]
  %.021 = add nsw i64 %.021.in54, -1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %50 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %.021
  %51 = load i64, ptr %50, align 8, !tbaa !5
  store i64 %51, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  store i64 %51, ptr %7, align 8, !tbaa !5
  %52 = icmp slt i64 %51, 0
  %53 = icmp ugt i64 %.021, 1
  %54 = and i1 %53, %52
  br i1 %54, label %.lr.ph51, label %._crit_edge52

.lr.ph51:                                         ; preds = %.lr.ph56, %.lr.ph51
  %55 = phi i64 [ %62, %.lr.ph51 ], [ %51, %.lr.ph56 ]
  %.12249 = phi i64 [ %56, %.lr.ph51 ], [ %.021, %.lr.ph56 ]
  %56 = add nsw i64 %.12249, -1
  %57 = getelementptr inbounds [200010 x i64], ptr @a, i64 0, i64 %56
  %58 = load i64, ptr %57, align 8, !tbaa !5
  %59 = add nsw i64 %58, %55
  store i64 %59, ptr %6, align 8, !tbaa !5
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %61 = load i64, ptr %60, align 8, !tbaa !5
  store i64 %61, ptr %7, align 8, !tbaa !5
  %62 = load i64, ptr %6, align 8, !tbaa !5
  %63 = icmp slt i64 %62, 0
  %64 = icmp ugt i64 %56, 1
  %65 = and i1 %64, %63
  br i1 %65, label %.lr.ph51, label %._crit_edge52, !llvm.loop !15

._crit_edge52:                                    ; preds = %.lr.ph51, %.lr.ph56
  %.122.lcssa = phi i64 [ %.021, %.lr.ph56 ], [ %56, %.lr.ph51 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @GL, ptr noundef nonnull align 8 dereferenceable(16) %8)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  %66 = icmp sgt i64 %.122.lcssa, 1
  br i1 %66, label %.lr.ph56, label %._crit_edge57.loopexit, !llvm.loop !16

.lr.ph60:                                         ; preds = %._crit_edge57, %.backedge
  %.01958 = phi i64 [ %.019.be, %.backedge ], [ %48, %._crit_edge57 ]
  %67 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @GL)
  br i1 %67, label %.critedge, label %68

68:                                               ; preds = %.lr.ph60
  %69 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) @GL)
  %70 = getelementptr inbounds i8, ptr %69, i64 8
  %71 = load i64, ptr %70, align 8, !tbaa !17
  %72 = add nsw i64 %71, %.01958
  %73 = icmp sgt i64 %72, -1
  br i1 %73, label %74, label %78

74:                                               ; preds = %68
  %75 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) @GL)
  %76 = load i64, ptr %75, align 8, !tbaa !19
  %77 = add nsw i64 %76, %.01958
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) @GL)
  br label %78

78:                                               ; preds = %74, %68
  %.120 = phi i64 [ %77, %74 ], [ %.01958, %68 ]
  %79 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) @GR)
  %80 = getelementptr inbounds i8, ptr %79, i64 8
  %81 = load i64, ptr %80, align 8, !tbaa !17
  %82 = add nsw i64 %81, %.120
  %83 = icmp sgt i64 %82, -1
  br i1 %83, label %84, label %88

84:                                               ; preds = %78
  %85 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) @GR)
  %86 = load i64, ptr %85, align 8, !tbaa !19
  %87 = add nsw i64 %86, %.120
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) @GR)
  br label %.backedge

88:                                               ; preds = %78
  br i1 %73, label %.backedge, label %.critedge

.backedge:                                        ; preds = %88, %84
  %.019.be = phi i64 [ %.120, %88 ], [ %87, %84 ]
  %89 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @GR)
  br i1 %89, label %.critedge, label %.lr.ph60

.critedge:                                        ; preds = %.lr.ph60, %.backedge, %88, %._crit_edge57
  %90 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @GL)
  br i1 %90, label %93, label %91

91:                                               ; preds = %.critedge
  %92 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @GR)
  %spec.select = select i1 %92, ptr @.str, ptr @.str.3
  br label %93

93:                                               ; preds = %91, %.critedge, %._crit_edge
  %.str.sink = phi ptr [ @.str, %._crit_edge ], [ @.str, %.critedge ], [ %spec.select, %91 ]
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %.str.sink)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret void
}

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

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

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

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

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

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

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

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

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


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