; LLVM IR from eyangch/competitive-programming :: USACOcontests/gold/2016.12/moocast.ll (Z5worksiPSt4pairIiiEx)

; 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<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z5worksiPSt4pairIiiEx(i32 noundef %0, ptr noundef %1, i64 noundef %2) #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca i1, align 1
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i8, align 1
  %18 = alloca %"class.std::queue", align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca i8, align 1
  store i32 %0, ptr %5, align 4, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !9
  store i64 %2, ptr %7, align 8, !tbaa !11
  %29 = load i32, ptr %5, align 4, !tbaa !5
  %30 = zext i32 %29 to i64
  %31 = call ptr @llvm.stacksave.p0()
  store ptr %31, ptr %8, align 8
  %32 = alloca %"class.std::vector", i64 %30, align 16
  store i64 %30, ptr %9, align 8
  %33 = icmp eq i64 %30, 0
  br i1 %33, label %40, label %34

34:                                               ; preds = %3
  %35 = getelementptr inbounds %"class.std::vector", ptr %32, i64 %30
  br label %36

36:                                               ; preds = %36, %34
  %37 = phi ptr [ %32, %34 ], [ %38, %36 ]
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %37) #6
  %38 = getelementptr inbounds %"class.std::vector", ptr %37, i64 1
  %39 = icmp eq ptr %38, %35
  br i1 %39, label %40, label %36

40:                                               ; preds = %36, %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %108, %40
  %42 = load i32, ptr %10, align 4, !tbaa !5
  %43 = load i32, ptr %5, align 4, !tbaa !5
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %111

46:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %47 = load i32, ptr %10, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %12, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %104, %46
  %50 = load i32, ptr %12, align 4, !tbaa !5
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %49
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %107

54:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %55 = load ptr, ptr %6, align 8, !tbaa !9
  %56 = load i32, ptr %10, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds %"struct.std::pair", ptr %55, i64 %57
  %59 = getelementptr inbounds %"struct.std::pair", ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 4, !tbaa !13
  %61 = load ptr, ptr %6, align 8, !tbaa !9
  %62 = load i32, ptr %12, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds %"struct.std::pair", ptr %61, i64 %63
  %65 = getelementptr inbounds %"struct.std::pair", ptr %64, i32 0, i32 0
  %66 = load i32, ptr %65, align 4, !tbaa !13
  %67 = sub nsw i32 %60, %66
  %68 = invoke noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %67, i32 noundef 2)
          to label %69 unwind label %99

69:                                               ; preds = %54
  %70 = load ptr, ptr %6, align 8, !tbaa !9
  %71 = load i32, ptr %10, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds %"struct.std::pair", ptr %70, i64 %72
  %74 = getelementptr inbounds %"struct.std::pair", ptr %73, i32 0, i32 1
  %75 = load i32, ptr %74, align 4, !tbaa !15
  %76 = load ptr, ptr %6, align 8, !tbaa !9
  %77 = load i32, ptr %12, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds %"struct.std::pair", ptr %76, i64 %78
  %80 = getelementptr inbounds %"struct.std::pair", ptr %79, i32 0, i32 1
  %81 = load i32, ptr %80, align 4, !tbaa !15
  %82 = sub nsw i32 %75, %81
  %83 = invoke noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %82, i32 noundef 2)
          to label %84 unwind label %99

84:                                               ; preds = %69
  %85 = fadd double %68, %83
  %86 = fptosi double %85 to i64
  store i64 %86, ptr %13, align 8, !tbaa !11
  %87 = load i64, ptr %13, align 8, !tbaa !11
  %88 = load i64, ptr %7, align 8, !tbaa !11
  %89 = icmp sle i64 %87, %88
  br i1 %89, label %90, label %103

90:                                               ; preds = %84
  %91 = load i32, ptr %10, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds %"class.std::vector", ptr %32, i64 %92
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %93, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %94 unwind label %99

94:                                               ; preds = %90
  %95 = load i32, ptr %12, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds %"class.std::vector", ptr %32, i64 %96
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %97, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %98 unwind label %99

98:                                               ; preds = %94
  br label %103

99:                                               ; preds = %94, %90, %69, %54
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %14, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %227

103:                                              ; preds = %98, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %12, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %12, align 4, !tbaa !5
  br label %49, !llvm.loop !16

107:                                              ; preds = %53
  br label %108

108:                                              ; preds = %107
  %109 = load i32, ptr %10, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %10, align 4, !tbaa !5
  br label %41, !llvm.loop !18

111:                                              ; preds = %45
  %112 = load i32, ptr %5, align 4, !tbaa !5
  %113 = zext i32 %112 to i64
  %114 = alloca i8, i64 %113, align 16
  store i64 %113, ptr %16, align 8
  %115 = load i32, ptr %5, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds i8, ptr %114, i64 %116
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  store i8 0, ptr %17, align 1, !tbaa !19
  invoke void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef %114, ptr noundef %117, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %118 unwind label %136

118:                                              ; preds = %111
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 80, ptr %18) #6
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %18)
          to label %119 unwind label %140

119:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(80) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %120 unwind label %144

120:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %121

121:                                              ; preds = %185, %183, %120
  %122 = invoke noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %18)
          to label %123 unwind label %148

123:                                              ; preds = %121
  %124 = xor i1 %122, true
  br i1 %124, label %125, label %187

125:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %126 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %18)
          to label %127 unwind label %152

127:                                              ; preds = %125
  %128 = load i32, ptr %126, align 4, !tbaa !5
  store i32 %128, ptr %20, align 4, !tbaa !5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %18)
          to label %129 unwind label %152

129:                                              ; preds = %127
  %130 = load i32, ptr %20, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds i8, ptr %114, i64 %131
  %133 = load i8, ptr %132, align 1, !tbaa !19, !range !21, !noundef !22
  %134 = trunc i8 %133 to i1
  br i1 %134, label %135, label %156

135:                                              ; preds = %129
  store i32 8, ptr %11, align 4
  br label %183, !llvm.loop !23

136:                                              ; preds = %111
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %14, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  br label %227

140:                                              ; preds = %118
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %14, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %15, align 4
  br label %219

144:                                              ; preds = %119
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %14, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %218

148:                                              ; preds = %121
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %14, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %15, align 4
  br label %218

152:                                              ; preds = %127, %125
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %14, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %15, align 4
  br label %186

156:                                              ; preds = %129
  %157 = load i32, ptr %20, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds i8, ptr %114, i64 %158
  store i8 1, ptr %159, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %160 = load i32, ptr %20, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds %"class.std::vector", ptr %32, i64 %161
  store ptr %162, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %163 = load ptr, ptr %21, align 8, !tbaa !9
  %164 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %163) #6
  %165 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %164, ptr %165, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %166 = load ptr, ptr %21, align 8, !tbaa !9
  %167 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %166) #6
  %168 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %167, ptr %168, align 8
  br label %169

169:                                              ; preds = %176, %156
  %170 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  br i1 %170, label %172, label %171

171:                                              ; preds = %169
  store i32 10, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %182

172:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %173 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  %174 = load i32, ptr %173, align 4, !tbaa !5
  store i32 %174, ptr %24, align 4, !tbaa !5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %18, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %175 unwind label %178

175:                                              ; preds = %172
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %176

176:                                              ; preds = %175
  %177 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  br label %169

178:                                              ; preds = %172
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %14, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %186

182:                                              ; preds = %171
  store i32 0, ptr %11, align 4
  br label %183

183:                                              ; preds = %182, %135
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  %184 = load i32, ptr %11, align 4
  switch i32 %184, label %240 [
    i32 0, label %185
    i32 8, label %121
  ]

185:                                              ; preds = %183
  br label %121, !llvm.loop !23

186:                                              ; preds = %178, %152
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %218

187:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  store ptr %114, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %188 = load ptr, ptr %25, align 8, !tbaa !9
  store ptr %188, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %189 = load ptr, ptr %25, align 8, !tbaa !9
  %190 = udiv i64 %113, 1
  %191 = getelementptr inbounds i8, ptr %189, i64 %190
  store ptr %191, ptr %27, align 8, !tbaa !9
  br label %192

192:                                              ; preds = %209, %187
  %193 = load ptr, ptr %26, align 8, !tbaa !9
  %194 = load ptr, ptr %27, align 8, !tbaa !9
  %195 = icmp ne ptr %193, %194
  br i1 %195, label %197, label %196

196:                                              ; preds = %192
  store i32 12, ptr %11, align 4
  br label %212

197:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #6
  %198 = load ptr, ptr %26, align 8, !tbaa !9
  %199 = load i8, ptr %198, align 1, !tbaa !19, !range !21, !noundef !22
  %200 = trunc i8 %199 to i1
  %201 = zext i1 %200 to i8
  store i8 %201, ptr %28, align 1, !tbaa !19
  %202 = load i8, ptr %28, align 1, !tbaa !19, !range !21, !noundef !22
  %203 = trunc i8 %202 to i1
  br i1 %203, label %205, label %204

204:                                              ; preds = %197
  store i1 false, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %206

205:                                              ; preds = %197
  store i32 0, ptr %11, align 4
  br label %206

206:                                              ; preds = %205, %204
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #6
  %207 = load i32, ptr %11, align 4
  switch i32 %207, label %212 [
    i32 0, label %208
  ]

208:                                              ; preds = %206
  br label %209

209:                                              ; preds = %208
  %210 = load ptr, ptr %26, align 8, !tbaa !9
  %211 = getelementptr inbounds i8, ptr %210, i32 1
  store ptr %211, ptr %26, align 8, !tbaa !9
  br label %192

212:                                              ; preds = %206, %196
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  %213 = load i32, ptr %11, align 4
  switch i32 %213, label %215 [
    i32 12, label %214
  ]

214:                                              ; preds = %212
  store i1 true, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %215

215:                                              ; preds = %214, %212
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %18) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %18) #6
  %216 = getelementptr inbounds %"class.std::vector", ptr %32, i64 %30
  %217 = icmp eq ptr %32, %216
  br i1 %217, label %224, label %220

218:                                              ; preds = %186, %148, %144
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %18) #6
  br label %219

219:                                              ; preds = %218, %140
  call void @llvm.lifetime.end.p0(i64 80, ptr %18) #6
  br label %227

220:                                              ; preds = %220, %215
  %221 = phi ptr [ %216, %215 ], [ %222, %220 ]
  %222 = getelementptr inbounds %"class.std::vector", ptr %221, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %222) #6
  %223 = icmp eq ptr %222, %32
  br i1 %223, label %224, label %220

224:                                              ; preds = %220, %215
  %225 = load ptr, ptr %8, align 8
  call void @llvm.stackrestore.p0(ptr %225)
  %226 = load i1, ptr %4, align 1
  ret i1 %226

227:                                              ; preds = %219, %136, %99
  %228 = getelementptr inbounds %"class.std::vector", ptr %32, i64 %30
  %229 = icmp eq ptr %32, %228
  br i1 %229, label %234, label %230

230:                                              ; preds = %230, %227
  %231 = phi ptr [ %228, %227 ], [ %232, %230 ]
  %232 = getelementptr inbounds %"class.std::vector", ptr %231, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %232) #6
  %233 = icmp eq ptr %232, %32
  br i1 %233, label %234, label %230

234:                                              ; preds = %230, %227
  br label %235

235:                                              ; preds = %234
  %236 = load ptr, ptr %14, align 8
  %237 = load i32, ptr %15, align 4
  %238 = insertvalue { ptr, i32 } poison, ptr %236, 0
  %239 = insertvalue { ptr, i32 } %238, i32 %237, 1
  resume { ptr, i32 } %239

240:                                              ; preds = %183
  unreachable
}

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef, i32 noundef) #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) #5

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #1

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

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

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


; 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<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z5worksiPSt4pairIiiEx(i32 noundef %0, ptr nocapture noundef readonly %1, i64 noundef %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i8, align 1
  %7 = alloca %"class.std::queue", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca i32, align 4
  %12 = zext i32 %0 to i64
  %13 = alloca %"class.std::vector", i64 %12, align 16
  %14 = icmp eq i32 %0, 0
  br i1 %14, label %.loopexit52.thread, label %15

.loopexit52.thread:                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  br label %._crit_edge58

15:                                               ; preds = %3
  %16 = getelementptr inbounds %"class.std::vector", ptr %13, i64 %12
  br label %17

17:                                               ; preds = %17, %15
  %18 = phi ptr [ %13, %15 ], [ %19, %17 ]
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  %19 = getelementptr inbounds i8, ptr %18, i64 24
  %20 = icmp eq ptr %19, %16
  br i1 %20, label %.loopexit52, label %17

.loopexit52:                                      ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  %21 = icmp sgt i32 %0, 0
  br i1 %21, label %.lr.ph57, label %._crit_edge58

._crit_edge58:                                    ; preds = %._crit_edge, %.loopexit52.thread, %.loopexit52
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  %22 = alloca i8, i64 %12, align 16
  %23 = sext i32 %0 to i64
  %24 = getelementptr inbounds i8, ptr %22, i64 %23
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #5
  store i8 0, ptr %6, align 1, !tbaa !9
  invoke void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull %22, ptr noundef nonnull %24, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %60 unwind label %70

.lr.ph57:                                         ; preds = %.loopexit52, %._crit_edge
  %storemerge46.in53 = phi i32 [ %.pre-phi, %._crit_edge ], [ 0, %.loopexit52 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %storemerge4654 = add nsw i32 %storemerge46.in53, 1
  store i32 %storemerge4654, ptr %5, align 4, !tbaa !5
  %25 = icmp slt i32 %storemerge4654, %0
  br i1 %25, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %58
  %.pre = load i32, ptr %4, align 4, !tbaa !5
  %.pre73 = add nsw i32 %.pre, 1
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph57
  %.pre-phi = phi i32 [ %.pre73, %._crit_edge.loopexit ], [ %storemerge4654, %.lr.ph57 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  store i32 %.pre-phi, ptr %4, align 4, !tbaa !5
  %26 = icmp slt i32 %.pre-phi, %0
  br i1 %26, label %.lr.ph57, label %._crit_edge58, !llvm.loop !11

.lr.ph:                                           ; preds = %.lr.ph57, %58
  %storemerge4655 = phi i32 [ %storemerge46, %58 ], [ %storemerge4654, %.lr.ph57 ]
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds %"struct.std::pair", ptr %1, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !13
  %31 = sext i32 %storemerge4655 to i64
  %32 = getelementptr inbounds %"struct.std::pair", ptr %1, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !13
  %34 = sub nsw i32 %30, %33
  %35 = call noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %34, i32 noundef 2)
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds %"struct.std::pair", ptr %1, i64 %37, i32 1
  %39 = load i32, ptr %38, align 4, !tbaa !15
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds %"struct.std::pair", ptr %1, i64 %41, i32 1
  %43 = load i32, ptr %42, align 4, !tbaa !15
  %44 = sub nsw i32 %39, %43
  %45 = call noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %44, i32 noundef 2)
  %46 = fadd double %35, %45
  %47 = fptosi double %46 to i64
  %.not47 = icmp sgt i64 %47, %2
  br i1 %.not47, label %58, label %48

48:                                               ; preds = %.lr.ph
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds %"class.std::vector", ptr %13, i64 %50
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %51, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %52 unwind label %56

52:                                               ; preds = %48
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds %"class.std::vector", ptr %13, i64 %54
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %55, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %58 unwind label %56

56:                                               ; preds = %52, %48
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %100

58:                                               ; preds = %52, %.lr.ph
  %storemerge46.in = load i32, ptr %5, align 4, !tbaa !5
  %storemerge46 = add nsw i32 %storemerge46.in, 1
  store i32 %storemerge46, ptr %5, align 4, !tbaa !5
  %59 = icmp slt i32 %storemerge46, %0
  br i1 %59, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !16

60:                                               ; preds = %._crit_edge58
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %7) #5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %61 unwind label %72

61:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %62 unwind label %74

62:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  %63 = call noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
  br i1 %63, label %._crit_edge64, label %.lr.ph63

.lr.ph63:                                         ; preds = %62, %88
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
  %65 = load i32, ptr %64, align 4, !tbaa !5
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds i8, ptr %22, i64 %66
  %68 = load i8, ptr %67, align 1, !tbaa !9, !range !17, !noundef !18
  %69 = trunc nuw i8 %68 to i1
  br i1 %69, label %88, label %76, !llvm.loop !19

70:                                               ; preds = %._crit_edge58
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  br label %100

72:                                               ; preds = %60
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %96

74:                                               ; preds = %61
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  br label %95

76:                                               ; preds = %.lr.ph63
  store i8 1, ptr %67, align 1, !tbaa !9
  %77 = getelementptr inbounds %"class.std::vector", ptr %13, i64 %66
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %78 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %77) #5
  store ptr %78, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %79 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %77) #5
  store ptr %79, ptr %10, align 8
  %80 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  br i1 %80, label %.lr.ph60, label %._crit_edge61

._crit_edge61:                                    ; preds = %83, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %88

.lr.ph60:                                         ; preds = %76, %83
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  %82 = load i32, ptr %81, align 4, !tbaa !5
  store i32 %82, ptr %11, align 4, !tbaa !5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %83 unwind label %86

83:                                               ; preds = %.lr.ph60
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  %85 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  br i1 %85, label %.lr.ph60, label %._crit_edge61

86:                                               ; preds = %.lr.ph60
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %95

88:                                               ; preds = %.lr.ph63, %._crit_edge61
  %89 = call noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
  br i1 %89, label %._crit_edge64, label %.lr.ph63

._crit_edge64:                                    ; preds = %88, %62
  %90 = getelementptr inbounds i8, ptr %22, i64 %12
  br i1 %14, label %.critedge.thread, label %.lr.ph69

.critedge.thread:                                 ; preds = %._crit_edge64
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #5
  br label %.loopexit51

.lr.ph69:                                         ; preds = %._crit_edge64, %.lr.ph69
  %.03166 = phi ptr [ %93, %.lr.ph69 ], [ %22, %._crit_edge64 ]
  %91 = load i8, ptr %.03166, align 1, !tbaa !9, !range !17, !noundef !18
  %92 = trunc nuw i8 %91 to i1
  %93 = getelementptr inbounds i8, ptr %.03166, i64 1
  %.not = icmp ne ptr %93, %90
  %or.cond.not = select i1 %92, i1 %.not, i1 false
  br i1 %or.cond.not, label %.lr.ph69, label %.critedge

.critedge:                                        ; preds = %.lr.ph69
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #5
  br i1 %14, label %.loopexit51, label %.preheader50.preheader

.preheader50.preheader:                           ; preds = %.critedge
  %94 = getelementptr inbounds %"class.std::vector", ptr %13, i64 %12
  br label %.preheader50

95:                                               ; preds = %86, %74
  %.pn = phi { ptr, i32 } [ %87, %86 ], [ %75, %74 ]
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  br label %96

96:                                               ; preds = %95, %72
  %.pn.pn = phi { ptr, i32 } [ %.pn, %95 ], [ %73, %72 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #5
  br label %100

.preheader50:                                     ; preds = %.preheader50.preheader, %.preheader50
  %97 = phi ptr [ %98, %.preheader50 ], [ %94, %.preheader50.preheader ]
  %98 = getelementptr inbounds i8, ptr %97, i64 -24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %98) #5
  %99 = icmp eq ptr %98, %13
  br i1 %99, label %.loopexit51, label %.preheader50

.loopexit51:                                      ; preds = %.preheader50, %.critedge.thread, %.critedge
  %.not.lcssa75 = phi i1 [ true, %.critedge.thread ], [ %92, %.critedge ], [ %92, %.preheader50 ]
  ret i1 %.not.lcssa75

100:                                              ; preds = %96, %70, %56
  %.pn48 = phi { ptr, i32 } [ %57, %56 ], [ %.pn.pn, %96 ], [ %71, %70 ]
  br i1 %14, label %.loopexit, label %.preheader.preheader

.preheader.preheader:                             ; preds = %100
  %101 = getelementptr inbounds %"class.std::vector", ptr %13, i64 %12
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %102 = phi ptr [ %103, %.preheader ], [ %101, %.preheader.preheader ]
  %103 = getelementptr inbounds i8, ptr %102, i64 -24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %103) #5
  %104 = icmp eq ptr %103, %13
  br i1 %104, label %.loopexit, label %.preheader

.loopexit:                                        ; preds = %.preheader, %100
  resume { ptr, i32 } %.pn48
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef, i32 noundef) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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