; LLVM IR from upupming/algorithm :: upupming/1091.ll (Z3bfsiii)

; 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<pos, std::allocator<pos>>::_Deque_impl" }
%"struct.std::_Deque_base<pos, std::allocator<pos>>::_Deque_impl" = type { %"struct.std::_Deque_base<pos, std::allocator<pos>>::_Deque_impl_data" }
%"struct.std::_Deque_base<pos, std::allocator<pos>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%struct.pos = type { i32, i32, i32 }

@visited = external dso_local global [1300 x [140 x [100 x i8]]], align 16

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

; 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 dso_local void @_ZNSt5queueI3posSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(12)) #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: mustprogress uwtable
define dso_local noundef i32 @_Z3bfsiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::queue", align 8
  %8 = alloca %struct.pos, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.pos, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 80, ptr %7) #5
  call void @_ZNSt5queueI3posSt5dequeIS0_SaIS0_EEEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
  %13 = load i32, ptr %4, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [1300 x [140 x [100 x i8]]], ptr @visited, i64 0, i64 %14
  %16 = load i32, ptr %5, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [140 x [100 x i8]], ptr %15, i64 0, i64 %17
  %19 = load i32, ptr %6, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [100 x i8], ptr %18, i64 0, i64 %20
  store i8 1, ptr %21, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #5
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = getelementptr inbounds %struct.pos, ptr %8, i32 0, i32 0
  store i32 %22, ptr %23, align 4, !tbaa !11
  %24 = load i32, ptr %5, align 4, !tbaa !5
  %25 = getelementptr inbounds %struct.pos, ptr %8, i32 0, i32 1
  store i32 %24, ptr %25, align 4, !tbaa !13
  %26 = load i32, ptr %6, align 4, !tbaa !5
  %27 = getelementptr inbounds %struct.pos, ptr %8, i32 0, i32 2
  store i32 %26, ptr %27, align 4, !tbaa !14
  invoke void @_ZNSt5queueI3posSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr noundef nonnull align 4 dereferenceable(12) %8)
          to label %28 unwind label %87

28:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %29

29:                                               ; preds = %86, %28
  %30 = invoke noundef zeroext i1 @_ZNKSt5queueI3posSt5dequeIS0_SaIS0_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %31 unwind label %91

31:                                               ; preds = %29
  %32 = xor i1 %30, true
  br i1 %32, label %33, label %99

33:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #5
  %34 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt5queueI3posSt5dequeIS0_SaIS0_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %35 unwind label %95

35:                                               ; preds = %33
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %34, i64 12, i1 false), !tbaa.struct !15
  invoke void @_ZNSt5queueI3posSt5dequeIS0_SaIS0_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %36 unwind label %95

36:                                               ; preds = %35
  %37 = load i32, ptr %11, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %11, align 4, !tbaa !5
  %39 = getelementptr inbounds %struct.pos, ptr %12, i32 0, i32 0
  %40 = load i32, ptr %39, align 4, !tbaa !11
  %41 = sub nsw i32 %40, 1
  %42 = getelementptr inbounds %struct.pos, ptr %12, i32 0, i32 1
  %43 = load i32, ptr %42, align 4, !tbaa !13
  %44 = getelementptr inbounds %struct.pos, ptr %12, i32 0, i32 2
  %45 = load i32, ptr %44, align 4, !tbaa !14
  invoke void @_Z7inQueueiiiRSt5queueI3posSt5dequeIS0_SaIS0_EEE(i32 noundef %41, i32 noundef %43, i32 noundef %45, ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %46 unwind label %95

46:                                               ; preds = %36
  %47 = getelementptr inbounds %struct.pos, ptr %12, i32 0, i32 0
  %48 = load i32, ptr %47, align 4, !tbaa !11
  %49 = add nsw i32 %48, 1
  %50 = getelementptr inbounds %struct.pos, ptr %12, i32 0, i32 1
  %51 = load i32, ptr %50, align 4, !tbaa !13
  %52 = getelementptr inbounds %struct.pos, ptr %12, i32 0, i32 2
  %53 = load i32, ptr %52, align 4, !tbaa !14
  invoke void @_Z7inQueueiiiRSt5queueI3posSt5dequeIS0_SaIS0_EEE(i32 noundef %49, i32 noundef %51, i32 noundef %53, ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %54 unwind label %95

54:                                               ; preds = %46
  %55 = getelementptr inbounds %struct.pos, ptr %12, i32 0, i32 0
  %56 = load i32, ptr %55, align 4, !tbaa !11
  %57 = getelementptr inbounds %struct.pos, ptr %12, i32 0, i32 1
  %58 = load i32, ptr %57, align 4, !tbaa !13
  %59 = sub nsw i32 %58, 1
  %60 = getelementptr inbounds %struct.pos, ptr %12, i32 0, i32 2
  %61 = load i32, ptr %60, align 4, !tbaa !14
  invoke void @_Z7inQueueiiiRSt5queueI3posSt5dequeIS0_SaIS0_EEE(i32 noundef %56, i32 noundef %59, i32 noundef %61, ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %62 unwind label %95

62:                                               ; preds = %54
  %63 = getelementptr inbounds %struct.pos, ptr %12, i32 0, i32 0
  %64 = load i32, ptr %63, align 4, !tbaa !11
  %65 = getelementptr inbounds %struct.pos, ptr %12, i32 0, i32 1
  %66 = load i32, ptr %65, align 4, !tbaa !13
  %67 = add nsw i32 %66, 1
  %68 = getelementptr inbounds %struct.pos, ptr %12, i32 0, i32 2
  %69 = load i32, ptr %68, align 4, !tbaa !14
  invoke void @_Z7inQueueiiiRSt5queueI3posSt5dequeIS0_SaIS0_EEE(i32 noundef %64, i32 noundef %67, i32 noundef %69, ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %70 unwind label %95

70:                                               ; preds = %62
  %71 = getelementptr inbounds %struct.pos, ptr %12, i32 0, i32 0
  %72 = load i32, ptr %71, align 4, !tbaa !11
  %73 = getelementptr inbounds %struct.pos, ptr %12, i32 0, i32 1
  %74 = load i32, ptr %73, align 4, !tbaa !13
  %75 = getelementptr inbounds %struct.pos, ptr %12, i32 0, i32 2
  %76 = load i32, ptr %75, align 4, !tbaa !14
  %77 = sub nsw i32 %76, 1
  invoke void @_Z7inQueueiiiRSt5queueI3posSt5dequeIS0_SaIS0_EEE(i32 noundef %72, i32 noundef %74, i32 noundef %77, ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %78 unwind label %95

78:                                               ; preds = %70
  %79 = getelementptr inbounds %struct.pos, ptr %12, i32 0, i32 0
  %80 = load i32, ptr %79, align 4, !tbaa !11
  %81 = getelementptr inbounds %struct.pos, ptr %12, i32 0, i32 1
  %82 = load i32, ptr %81, align 4, !tbaa !13
  %83 = getelementptr inbounds %struct.pos, ptr %12, i32 0, i32 2
  %84 = load i32, ptr %83, align 4, !tbaa !14
  %85 = add nsw i32 %84, 1
  invoke void @_Z7inQueueiiiRSt5queueI3posSt5dequeIS0_SaIS0_EEE(i32 noundef %80, i32 noundef %82, i32 noundef %85, ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %86 unwind label %95

86:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #5
  br label %29, !llvm.loop !16

87:                                               ; preds = %3
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %9, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %10, align 4
  br label %102

91:                                               ; preds = %29
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %9, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %10, align 4
  br label %101

95:                                               ; preds = %78, %70, %62, %54, %46, %36, %35, %33
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %9, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #5
  br label %101

99:                                               ; preds = %31
  %100 = load i32, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #5
  call void @_ZNSt5queueI3posSt5dequeIS0_SaIS0_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %7) #5
  ret i32 %100

101:                                              ; preds = %95, %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %102

102:                                              ; preds = %101, %87
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #5
  call void @_ZNSt5queueI3posSt5dequeIS0_SaIS0_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %7) #5
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %9, align 8
  %105 = load i32, ptr %10, align 4
  %106 = insertvalue { ptr, i32 } poison, ptr %104, 0
  %107 = insertvalue { ptr, i32 } %106, i32 %105, 1
  resume { ptr, i32 } %107
}

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueI3posSt5dequeIS0_SaIS0_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #4 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 = { 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 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 = { 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 = !{!12, !6, i64 0}
!12 = !{!"_ZTS3pos", !6, i64 0, !6, i64 4, !6, i64 8}
!13 = !{!12, !6, i64 4}
!14 = !{!12, !6, i64 8}
!15 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


; 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<pos, std::allocator<pos>>::_Deque_impl" }
%"struct.std::_Deque_base<pos, std::allocator<pos>>::_Deque_impl" = type { %"struct.std::_Deque_base<pos, std::allocator<pos>>::_Deque_impl_data" }
%"struct.std::_Deque_base<pos, std::allocator<pos>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%struct.pos = type { i32, i32, i32 }

@visited = external dso_local local_unnamed_addr global [1300 x [140 x [100 x i8]]], align 16

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueI3posSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(12)) 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: mustprogress uwtable
define dso_local noundef i32 @_Z3bfsiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::queue", align 8
  %5 = alloca %struct.pos, align 4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %4) #4
  call void @_ZNSt5queueI3posSt5dequeIS0_SaIS0_EEEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %6 = sext i32 %0 to i64
  %7 = sext i32 %1 to i64
  %8 = sext i32 %2 to i64
  %9 = getelementptr inbounds [1300 x [140 x [100 x i8]]], ptr @visited, i64 0, i64 %6, i64 %7, i64 %8
  store i8 1, ptr %9, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #4
  store i32 %0, ptr %5, align 4, !tbaa !9
  %10 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 %1, ptr %10, align 4, !tbaa !12
  %11 = getelementptr inbounds i8, ptr %5, i64 8
  store i32 %2, ptr %11, align 4, !tbaa !13
  invoke void @_ZNSt5queueI3posSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 4 dereferenceable(12) %5)
          to label %.preheader unwind label %27

.preheader:                                       ; preds = %3, %25
  %.025 = phi i32 [ %15, %25 ], [ 0, %3 ]
  %12 = call noundef zeroext i1 @_ZNKSt5queueI3posSt5dequeIS0_SaIS0_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  br i1 %12, label %31, label %13

13:                                               ; preds = %.preheader
  %14 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt5queueI3posSt5dequeIS0_SaIS0_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %.sroa.0.0.copyload = load i32, ptr %14, align 4, !tbaa !14
  %.sroa.10.0..sroa_idx = getelementptr inbounds i8, ptr %14, i64 4
  %.sroa.10.0.copyload = load i32, ptr %.sroa.10.0..sroa_idx, align 4, !tbaa !14
  %.sroa.16.0..sroa_idx = getelementptr inbounds i8, ptr %14, i64 8
  %.sroa.16.0.copyload = load i32, ptr %.sroa.16.0..sroa_idx, align 4, !tbaa !14
  call void @_ZNSt5queueI3posSt5dequeIS0_SaIS0_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %15 = add nuw nsw i32 %.025, 1
  %16 = add nsw i32 %.sroa.0.0.copyload, -1
  invoke void @_Z7inQueueiiiRSt5queueI3posSt5dequeIS0_SaIS0_EEE(i32 noundef %16, i32 noundef %.sroa.10.0.copyload, i32 noundef %.sroa.16.0.copyload, ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %17 unwind label %29

17:                                               ; preds = %13
  %18 = add nsw i32 %.sroa.0.0.copyload, 1
  invoke void @_Z7inQueueiiiRSt5queueI3posSt5dequeIS0_SaIS0_EEE(i32 noundef %18, i32 noundef %.sroa.10.0.copyload, i32 noundef %.sroa.16.0.copyload, ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %19 unwind label %29

19:                                               ; preds = %17
  %20 = add nsw i32 %.sroa.10.0.copyload, -1
  invoke void @_Z7inQueueiiiRSt5queueI3posSt5dequeIS0_SaIS0_EEE(i32 noundef %.sroa.0.0.copyload, i32 noundef %20, i32 noundef %.sroa.16.0.copyload, ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %21 unwind label %29

21:                                               ; preds = %19
  %22 = add nsw i32 %.sroa.10.0.copyload, 1
  invoke void @_Z7inQueueiiiRSt5queueI3posSt5dequeIS0_SaIS0_EEE(i32 noundef %.sroa.0.0.copyload, i32 noundef %22, i32 noundef %.sroa.16.0.copyload, ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %23 unwind label %29

23:                                               ; preds = %21
  %24 = add nsw i32 %.sroa.16.0.copyload, -1
  invoke void @_Z7inQueueiiiRSt5queueI3posSt5dequeIS0_SaIS0_EEE(i32 noundef %.sroa.0.0.copyload, i32 noundef %.sroa.10.0.copyload, i32 noundef %24, ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %25 unwind label %29

25:                                               ; preds = %23
  %26 = add nsw i32 %.sroa.16.0.copyload, 1
  invoke void @_Z7inQueueiiiRSt5queueI3posSt5dequeIS0_SaIS0_EEE(i32 noundef %.sroa.0.0.copyload, i32 noundef %.sroa.10.0.copyload, i32 noundef %26, ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %.preheader unwind label %29, !llvm.loop !15

27:                                               ; preds = %3
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %32

29:                                               ; preds = %25, %23, %21, %19, %17, %13
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %32

31:                                               ; preds = %.preheader
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #4
  call void @_ZNSt5queueI3posSt5dequeIS0_SaIS0_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #4
  ret i32 %.025

32:                                               ; preds = %29, %27
  %.pn = phi { ptr, i32 } [ %30, %29 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #4
  call void @_ZNSt5queueI3posSt5dequeIS0_SaIS0_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn
}

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueI3posSt5dequeIS0_SaIS0_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) 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 = { 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 = { 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 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS3pos", !11, i64 0, !11, i64 4, !11, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!10, !11, i64 8}
!14 = !{!11, !11, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass