; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Codeforces Round #775 (Div. 2, based on Moscow Open Olympiad in Informati_79969a79 (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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<long, std::allocator<long>>::_Deque_impl" }
%"struct.std::_Deque_base<long, std::allocator<long>>::_Deque_impl" = type { %"struct.std::_Deque_base<long, std::allocator<long>>::_Deque_impl_data" }
%"struct.std::_Deque_base<long, std::allocator<long>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca %"class.std::deque", align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.start.p0(i64 80, ptr %2) #5
  call void @_ZNSt5dequeIlSaIlEEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store i64 0, ptr %3, align 8, !tbaa !5
  br label %8

8:                                                ; preds = %17, %0
  %9 = load i64, ptr %3, align 8, !tbaa !5
  %10 = load i64, ptr %1, align 8, !tbaa !5
  %11 = icmp slt i64 %9, %10
  br i1 %11, label %13, label %12

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

13:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %14 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %15 unwind label %20

15:                                               ; preds = %13
  invoke void @_ZNSt5dequeIlSaIlEE9push_backERKl(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %16 unwind label %20

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

17:                                               ; preds = %16
  %18 = load i64, ptr %3, align 8, !tbaa !5
  %19 = add nsw i64 %18, 1
  store i64 %19, ptr %3, align 8, !tbaa !5
  br label %8, !llvm.loop !9

20:                                               ; preds = %15, %13
  %21 = landingpad { ptr, i32 }
          cleanup
  %22 = extractvalue { ptr, i32 } %21, 0
  store ptr %22, ptr %5, align 8
  %23 = extractvalue { ptr, i32 } %21, 1
  store i32 %23, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %63

24:                                               ; preds = %12
  br label %25

25:                                               ; preds = %33, %24
  %26 = call noundef zeroext i1 @_ZNKSt5dequeIlSaIlEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  br i1 %26, label %31, label %27

27:                                               ; preds = %25
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIlSaIlEE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  %29 = load i64, ptr %28, align 8, !tbaa !5
  %30 = icmp eq i64 %29, 1
  br label %31

31:                                               ; preds = %27, %25
  %32 = phi i1 [ false, %25 ], [ %30, %27 ]
  br i1 %32, label %33, label %34

33:                                               ; preds = %31
  call void @_ZNSt5dequeIlSaIlEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  br label %25, !llvm.loop !11

34:                                               ; preds = %31
  br label %35

35:                                               ; preds = %43, %34
  %36 = call noundef zeroext i1 @_ZNKSt5dequeIlSaIlEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  br i1 %36, label %41, label %37

37:                                               ; preds = %35
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIlSaIlEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  %39 = load i64, ptr %38, align 8, !tbaa !5
  %40 = icmp eq i64 %39, 1
  br label %41

41:                                               ; preds = %37, %35
  %42 = phi i1 [ false, %35 ], [ %40, %37 ]
  br i1 %42, label %43, label %44

43:                                               ; preds = %41
  call void @_ZNSt5dequeIlSaIlEE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  br label %35, !llvm.loop !12

44:                                               ; preds = %41
  %45 = call noundef zeroext i1 @_ZNKSt5dequeIlSaIlEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  br i1 %45, label %46, label %55

46:                                               ; preds = %44
  %47 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
          to label %48 unwind label %51

48:                                               ; preds = %46
  %49 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef @.str)
          to label %50 unwind label %51

50:                                               ; preds = %48
  br label %62

51:                                               ; preds = %59, %55, %48, %46
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %5, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %6, align 4
  br label %63

55:                                               ; preds = %44
  %56 = call noundef i64 @_ZNKSt5dequeIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  %57 = add i64 %56, 1
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %57)
          to label %59 unwind label %51

59:                                               ; preds = %55
  %60 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef @.str)
          to label %61 unwind label %51

61:                                               ; preds = %59
  br label %62

62:                                               ; preds = %61, %50
  call void @_ZNSt5dequeIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  ret void

63:                                               ; preds = %51, %20
  call void @_ZNSt5dequeIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  br label %64

64:                                               ; preds = %63
  %65 = load ptr, ptr %5, align 8
  %66 = load i32, ptr %6, align 4
  %67 = insertvalue { ptr, i32 } poison, ptr %65, 0
  %68 = insertvalue { ptr, i32 } %67, i32 %66, 1
  resume { ptr, i32 } %68
}

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

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

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

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

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

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = { "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", !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}


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

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca %"class.std::deque", align 8
  %3 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  %4 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %2) #5
  call void @_ZNSt5dequeIlSaIlEEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %5 = load i64, ptr %1, align 8, !tbaa !5
  %6 = icmp sgt i64 %5, 0
  br i1 %6, label %.lr.ph, label %.preheader

.preheader:                                       ; preds = %10, %0
  %7 = call noundef zeroext i1 @_ZNKSt5dequeIlSaIlEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  br i1 %7, label %.critedge, label %.lr.ph9

.lr.ph:                                           ; preds = %0, %10
  %.068 = phi i64 [ %11, %10 ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %8 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %9 unwind label %14

9:                                                ; preds = %.lr.ph
  invoke void @_ZNSt5dequeIlSaIlEE9push_backERKl(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %10 unwind label %14

10:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  %11 = add nuw nsw i64 %.068, 1
  %12 = load i64, ptr %1, align 8, !tbaa !5
  %13 = icmp slt i64 %11, %12
  br i1 %13, label %.lr.ph, label %.preheader, !llvm.loop !9

14:                                               ; preds = %9, %.lr.ph
  %15 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %39

.lr.ph9:                                          ; preds = %.preheader, %19
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIlSaIlEE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  %17 = load i64, ptr %16, align 8, !tbaa !5
  %18 = icmp eq i64 %17, 1
  br i1 %18, label %19, label %.critedge

19:                                               ; preds = %.lr.ph9
  call void @_ZNSt5dequeIlSaIlEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  %20 = call noundef zeroext i1 @_ZNKSt5dequeIlSaIlEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  br i1 %20, label %.critedge, label %.lr.ph9, !llvm.loop !11

.critedge:                                        ; preds = %.lr.ph9, %19, %.preheader
  %21 = call noundef zeroext i1 @_ZNKSt5dequeIlSaIlEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  br i1 %21, label %.critedge2, label %.lr.ph11

.lr.ph11:                                         ; preds = %.critedge, %25
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5dequeIlSaIlEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  %23 = load i64, ptr %22, align 8, !tbaa !5
  %24 = icmp eq i64 %23, 1
  br i1 %24, label %25, label %.critedge2

25:                                               ; preds = %.lr.ph11
  call void @_ZNSt5dequeIlSaIlEE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  %26 = call noundef zeroext i1 @_ZNKSt5dequeIlSaIlEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  br i1 %26, label %.critedge2, label %.lr.ph11, !llvm.loop !12

.critedge2:                                       ; preds = %.lr.ph11, %25, %.critedge
  %27 = call noundef zeroext i1 @_ZNKSt5dequeIlSaIlEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  br i1 %27, label %28, label %32

28:                                               ; preds = %.critedge2
  %29 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
          to label %.invoke unwind label %30

30:                                               ; preds = %.invoke, %32, %28
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %39

32:                                               ; preds = %.critedge2
  %33 = call noundef i64 @_ZNKSt5dequeIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  %34 = add i64 %33, 1
  %35 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %34)
          to label %.invoke unwind label %30

.invoke:                                          ; preds = %28, %32
  %36 = phi ptr [ %35, %32 ], [ %29, %28 ]
  %37 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @.str)
          to label %38 unwind label %30

38:                                               ; preds = %.invoke
  call void @_ZNSt5dequeIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret void

39:                                               ; preds = %30, %14
  %.pn = phi { ptr, i32 } [ %15, %14 ], [ %31, %30 ]
  call void @_ZNSt5dequeIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %2) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn
}

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

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

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

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

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

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = { "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", !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}


; Effective O3 passes: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass