; LLVM IR from AnneLivia/Competitive-Programming :: Online Judges/URI/2376 (main)

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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::queue", align 8
  %3 = alloca i8, align 1
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 80, ptr %2) #7
  call void @_ZNSt5queueIcSt5dequeIcSaIcEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #7
  store i8 65, ptr %3, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !8
  br label %11

11:                                               ; preds = %17, %0
  %12 = load i32, ptr %7, align 4, !tbaa !8
  %13 = icmp slt i32 %12, 16
  br i1 %13, label %14, label %24

14:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  %15 = load i8, ptr %3, align 1, !tbaa !5
  %16 = add i8 %15, 1
  store i8 %16, ptr %3, align 1, !tbaa !5
  store i8 %15, ptr %8, align 1, !tbaa !5
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushEOc(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %17 unwind label %20

17:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  %18 = load i32, ptr %7, align 4, !tbaa !8
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr %7, align 4, !tbaa !8
  br label %11, !llvm.loop !10

20:                                               ; preds = %14
  %21 = landingpad { ptr, i32 }
          cleanup
  %22 = extractvalue { ptr, i32 } %21, 0
  store ptr %22, ptr %9, align 8
  %23 = extractvalue { ptr, i32 } %21, 1
  store i32 %23, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  br label %73

24:                                               ; preds = %11
  store i32 0, ptr %7, align 4, !tbaa !8
  br label %25

25:                                               ; preds = %54, %24
  %26 = load i32, ptr %7, align 4, !tbaa !8
  %27 = icmp slt i32 %26, 15
  br i1 %27, label %28, label %57

28:                                               ; preds = %25
  %29 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %30 unwind label %43

30:                                               ; preds = %28
  %31 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %32 unwind label %43

32:                                               ; preds = %30
  %33 = load i32, ptr %5, align 4, !tbaa !8
  %34 = load i32, ptr %6, align 4, !tbaa !8
  %35 = icmp sgt i32 %33, %34
  br i1 %35, label %36, label %47

36:                                               ; preds = %32
  %37 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5queueIcSt5dequeIcSaIcEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
          to label %38 unwind label %43

38:                                               ; preds = %36
  %39 = load i8, ptr %37, align 1, !tbaa !5
  store i8 %39, ptr %3, align 1, !tbaa !5
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
          to label %40 unwind label %43

40:                                               ; preds = %38
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
          to label %41 unwind label %43

41:                                               ; preds = %40
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushERKc(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %42 unwind label %43

42:                                               ; preds = %41
  br label %54

43:                                               ; preds = %69, %67, %64, %62, %58, %52, %50, %48, %47, %41, %40, %38, %36, %30, %28
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %9, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %10, align 4
  br label %73

47:                                               ; preds = %32
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
          to label %48 unwind label %43

48:                                               ; preds = %47
  %49 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5queueIcSt5dequeIcSaIcEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
          to label %50 unwind label %43

50:                                               ; preds = %48
  %51 = load i8, ptr %49, align 1, !tbaa !5
  store i8 %51, ptr %4, align 1, !tbaa !5
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
          to label %52 unwind label %43

52:                                               ; preds = %50
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushERKc(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %53 unwind label %43

53:                                               ; preds = %52
  br label %54

54:                                               ; preds = %53, %42
  %55 = load i32, ptr %7, align 4, !tbaa !8
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %7, align 4, !tbaa !8
  br label %25, !llvm.loop !12

57:                                               ; preds = %25
  br label %58

58:                                               ; preds = %70, %57
  %59 = invoke noundef zeroext i1 @_ZNKSt5queueIcSt5dequeIcSaIcEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
          to label %60 unwind label %43

60:                                               ; preds = %58
  %61 = xor i1 %59, true
  br i1 %61, label %62, label %71

62:                                               ; preds = %60
  %63 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5queueIcSt5dequeIcSaIcEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
          to label %64 unwind label %43

64:                                               ; preds = %62
  %65 = load i8, ptr %63, align 1, !tbaa !5
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %65)
          to label %67 unwind label %43

67:                                               ; preds = %64
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %69 unwind label %43

69:                                               ; preds = %67
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
          to label %70 unwind label %43

70:                                               ; preds = %69
  br label %58, !llvm.loop !13

71:                                               ; preds = %60
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #7
  call void @_ZNSt5queueIcSt5dequeIcSaIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %2) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %2) #7
  %72 = load i32, ptr %1, align 4
  ret i32 %72

73:                                               ; preds = %43, %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #7
  call void @_ZNSt5queueIcSt5dequeIcSaIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %2) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %2) #7
  br label %74

74:                                               ; preds = %73
  %75 = load ptr, ptr %9, align 8
  %76 = load i32, ptr %10, align 4
  %77 = insertvalue { ptr, i32 } poison, ptr %75, 0
  %78 = insertvalue { ptr, i32 } %77, i32 %76, 1
  resume { ptr, i32 } %78
}

; 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 @_ZNSt5queueIcSt5dequeIcSaIcEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #2 align 2

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

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

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


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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::queue", align 8
  %2 = alloca i8, align 1
  %3 = alloca i8, align 1
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %1) #7
  call void @_ZNSt5queueIcSt5dequeIcSaIcEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  store i8 65, ptr %6, align 1, !tbaa !5
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushEOc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %7 unwind label %22

7:                                                ; preds = %0
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  store i8 66, ptr %6, align 1, !tbaa !5
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushEOc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %8 unwind label %22

8:                                                ; preds = %7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  store i8 67, ptr %6, align 1, !tbaa !5
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushEOc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %9 unwind label %22

9:                                                ; preds = %8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  store i8 69, ptr %2, align 1, !tbaa !5
  store i8 68, ptr %6, align 1, !tbaa !5
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushEOc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %10 unwind label %22

10:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  store i8 69, ptr %6, align 1, !tbaa !5
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushEOc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %11 unwind label %22

11:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  store i8 70, ptr %6, align 1, !tbaa !5
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushEOc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %12 unwind label %22

12:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  store i8 71, ptr %6, align 1, !tbaa !5
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushEOc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %13 unwind label %22

13:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  store i8 73, ptr %2, align 1, !tbaa !5
  store i8 72, ptr %6, align 1, !tbaa !5
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushEOc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %14 unwind label %22

14:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  store i8 73, ptr %6, align 1, !tbaa !5
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushEOc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %15 unwind label %22

15:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  store i8 74, ptr %6, align 1, !tbaa !5
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushEOc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %16 unwind label %22

16:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  store i8 75, ptr %6, align 1, !tbaa !5
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushEOc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %17 unwind label %22

17:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  store i8 77, ptr %2, align 1, !tbaa !5
  store i8 76, ptr %6, align 1, !tbaa !5
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushEOc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %18 unwind label %22

18:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  store i8 77, ptr %6, align 1, !tbaa !5
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushEOc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %19 unwind label %22

19:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  store i8 78, ptr %6, align 1, !tbaa !5
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushEOc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %20 unwind label %22

20:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  store i8 79, ptr %6, align 1, !tbaa !5
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushEOc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %21 unwind label %22

21:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  store i8 81, ptr %2, align 1, !tbaa !5
  store i8 80, ptr %6, align 1, !tbaa !5
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushEOc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %.preheader9.preheader unwind label %22

.preheader9.preheader:                            ; preds = %21
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  br label %.preheader9

22:                                               ; preds = %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %0
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  br label %48

.preheader:                                       ; preds = %39
  %24 = call noundef zeroext i1 @_ZNKSt5queueIcSt5dequeIcSaIcEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  br i1 %24, label %._crit_edge, label %.lr.ph

.preheader9:                                      ; preds = %.preheader9.preheader, %39
  %.111 = phi i32 [ %40, %39 ], [ 0, %.preheader9.preheader ]
  %25 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %26 unwind label %.loopexit.split-lp

26:                                               ; preds = %.preheader9
  %27 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %28 unwind label %.loopexit.split-lp

28:                                               ; preds = %26
  %29 = load i32, ptr %4, align 4, !tbaa !8
  %30 = load i32, ptr %5, align 4, !tbaa !8
  %31 = icmp sgt i32 %29, %30
  br i1 %31, label %32, label %36

32:                                               ; preds = %28
  %33 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5queueIcSt5dequeIcSaIcEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %34 = load i8, ptr %33, align 1, !tbaa !5
  store i8 %34, ptr %2, align 1, !tbaa !5
  call void @_ZNSt5queueIcSt5dequeIcSaIcEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  br label %.invoke

.invoke:                                          ; preds = %36, %32
  %35 = phi ptr [ %2, %32 ], [ %3, %36 ]
  call void @_ZNSt5queueIcSt5dequeIcSaIcEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  invoke void @_ZNSt5queueIcSt5dequeIcSaIcEEE4pushERKc(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 1 dereferenceable(1) %35)
          to label %39 unwind label %.loopexit.split-lp

.loopexit:                                        ; preds = %.lr.ph, %44
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %48

.loopexit.split-lp:                               ; preds = %.invoke, %.preheader9, %26
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %48

36:                                               ; preds = %28
  call void @_ZNSt5queueIcSt5dequeIcSaIcEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %37 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5queueIcSt5dequeIcSaIcEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %38 = load i8, ptr %37, align 1, !tbaa !5
  store i8 %38, ptr %3, align 1, !tbaa !5
  br label %.invoke

39:                                               ; preds = %.invoke
  %40 = add nuw nsw i32 %.111, 1
  %exitcond.not = icmp eq i32 %40, 15
  br i1 %exitcond.not, label %.preheader, label %.preheader9, !llvm.loop !10

.lr.ph:                                           ; preds = %.preheader, %46
  %41 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt5queueIcSt5dequeIcSaIcEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %42 = load i8, ptr %41, align 1, !tbaa !5
  %43 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %42)
          to label %44 unwind label %.loopexit

44:                                               ; preds = %.lr.ph
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %46 unwind label %.loopexit

46:                                               ; preds = %44
  call void @_ZNSt5queueIcSt5dequeIcSaIcEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %47 = call noundef zeroext i1 @_ZNKSt5queueIcSt5dequeIcSaIcEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  br i1 %47, label %._crit_edge, label %.lr.ph, !llvm.loop !12

._crit_edge:                                      ; preds = %46, %.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #7
  call void @_ZNSt5queueIcSt5dequeIcSaIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %1) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %1) #7
  ret i32 0

48:                                               ; preds = %.loopexit, %.loopexit.split-lp, %22
  %.pn = phi { ptr, i32 } [ %23, %22 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #7
  call void @_ZNSt5queueIcSt5dequeIcSaIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %1) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn
}

; 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 @_ZNSt5queueIcSt5dequeIcSaIcEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #2 align 2

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

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

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


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