; LLVM IR from Tunghohin/Competitive_Coding :: Poj/poj3268.ll (Z4spfaib)

; 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"

%struct.edge = type { i32, i32, i32, i8 }
%"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 }

@e = external dso_local global [200010 x %struct.edge], align 16
@head = external dso_local global [1010 x i32], align 16
@dist = external dso_local global [1010 x i32], align 16
@in_que = external dso_local global [1010 x i8], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4spfaib(i32 noundef %0, i1 noundef zeroext %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  %5 = alloca %"class.std::queue", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  %11 = zext i1 %1 to i8
  store i8 %11, ptr %4, align 1, !tbaa !9
  call void @llvm.memset.p0.i64(ptr align 16 @dist, i8 63, i64 4040, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @in_que, i8 0, i64 1010, i1 false)
  call void @llvm.lifetime.start.p0(i64 80, ptr %5) #5
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  %12 = load i32, ptr %3, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds [1010 x i32], ptr @dist, i64 0, i64 %13
  store i32 0, ptr %14, align 4, !tbaa !5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %15 unwind label %39

15:                                               ; preds = %2
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [1010 x i8], ptr @in_que, i64 0, i64 %17
  store i8 1, ptr %18, align 1, !tbaa !9
  br label %19

19:                                               ; preds = %117, %15
  %20 = invoke noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %21 unwind label %39

21:                                               ; preds = %19
  %22 = xor i1 %20, true
  br i1 %22, label %23, label %119

23:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %24 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %25 unwind label %43

25:                                               ; preds = %23
  %26 = load i32, ptr %24, align 4, !tbaa !5
  store i32 %26, ptr %8, align 4, !tbaa !5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %27 unwind label %43

27:                                               ; preds = %25
  %28 = load i32, ptr %8, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [1010 x i8], ptr @in_que, i64 0, i64 %29
  store i8 0, ptr %30, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %31 = load i32, ptr %8, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [1010 x i32], ptr @head, i64 0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  store i32 %34, ptr %9, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %111, %27
  %36 = load i32, ptr %9, align 4, !tbaa !5
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %47, label %38

38:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %117

39:                                               ; preds = %19, %2
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %6, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %7, align 4
  br label %120

43:                                               ; preds = %25, %23
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %6, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %7, align 4
  br label %118

47:                                               ; preds = %35
  %48 = load i32, ptr %9, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [200010 x %struct.edge], ptr @e, i64 0, i64 %49
  %51 = getelementptr inbounds %struct.edge, ptr %50, i32 0, i32 3
  %52 = load i8, ptr %51, align 4, !tbaa !11, !range !13, !noundef !14
  %53 = trunc i8 %52 to i1
  %54 = zext i1 %53 to i32
  %55 = load i8, ptr %4, align 1, !tbaa !9, !range !13, !noundef !14
  %56 = trunc i8 %55 to i1
  %57 = zext i1 %56 to i32
  %58 = icmp ne i32 %54, %57
  br i1 %58, label %59, label %60

59:                                               ; preds = %47
  br label %111

60:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %61 = load i32, ptr %9, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [200010 x %struct.edge], ptr @e, i64 0, i64 %62
  %64 = getelementptr inbounds %struct.edge, ptr %63, i32 0, i32 0
  %65 = load i32, ptr %64, align 16, !tbaa !15
  store i32 %65, ptr %10, align 4, !tbaa !5
  %66 = load i32, ptr %10, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [1010 x i32], ptr @dist, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = load i32, ptr %8, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [1010 x i32], ptr @dist, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = load i32, ptr %9, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [200010 x %struct.edge], ptr @e, i64 0, i64 %75
  %77 = getelementptr inbounds %struct.edge, ptr %76, i32 0, i32 1
  %78 = load i32, ptr %77, align 4, !tbaa !16
  %79 = add nsw i32 %73, %78
  %80 = icmp sgt i32 %69, %79
  br i1 %80, label %81, label %110

81:                                               ; preds = %60
  %82 = load i32, ptr %8, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [1010 x i32], ptr @dist, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = load i32, ptr %9, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [200010 x %struct.edge], ptr @e, i64 0, i64 %87
  %89 = getelementptr inbounds %struct.edge, ptr %88, i32 0, i32 1
  %90 = load i32, ptr %89, align 4, !tbaa !16
  %91 = add nsw i32 %85, %90
  %92 = load i32, ptr %10, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [1010 x i32], ptr @dist, i64 0, i64 %93
  store i32 %91, ptr %94, align 4, !tbaa !5
  %95 = load i32, ptr %10, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [1010 x i8], ptr @in_que, i64 0, i64 %96
  %98 = load i8, ptr %97, align 1, !tbaa !9, !range !13, !noundef !14
  %99 = trunc i8 %98 to i1
  br i1 %99, label %109, label %100

100:                                              ; preds = %81
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %101 unwind label %105

101:                                              ; preds = %100
  %102 = load i32, ptr %10, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [1010 x i8], ptr @in_que, i64 0, i64 %103
  store i8 1, ptr %104, align 1, !tbaa !9
  br label %109

105:                                              ; preds = %100
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %6, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %118

109:                                              ; preds = %101, %81
  br label %110

110:                                              ; preds = %109, %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %111

111:                                              ; preds = %110, %59
  %112 = load i32, ptr %9, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [200010 x %struct.edge], ptr @e, i64 0, i64 %113
  %115 = getelementptr inbounds %struct.edge, ptr %114, i32 0, i32 2
  %116 = load i32, ptr %115, align 8, !tbaa !17
  store i32 %116, ptr %9, align 4, !tbaa !5
  br label %35, !llvm.loop !18

117:                                              ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %19, !llvm.loop !20

118:                                              ; preds = %105, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %120

119:                                              ; preds = %21
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #5
  ret void

120:                                              ; preds = %118, %39
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #5
  br label %121

121:                                              ; preds = %120
  %122 = load ptr, ptr %6, align 8
  %123 = load i32, ptr %7, align 4
  %124 = insertvalue { ptr, i32 } poison, ptr %122, 0
  %125 = insertvalue { ptr, i32 } %124, i32 %123, 1
  resume { ptr, i32 } %125
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

; 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 @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #3 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)) #3 align 2

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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, !10, i64 12}
!12 = !{!"_ZTS4edge", !6, i64 0, !6, i64 4, !6, i64 8, !10, i64 12}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!12, !6, i64 0}
!16 = !{!12, !6, i64 4}
!17 = !{!12, !6, i64 8}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


; 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"

%struct.edge = type { i32, i32, i32, i8 }
%"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 }

@e = external dso_local local_unnamed_addr global [200010 x %struct.edge], align 16
@head = external dso_local local_unnamed_addr global [1010 x i32], align 16
@dist = external dso_local local_unnamed_addr global [1010 x i32], align 16
@in_que = external dso_local local_unnamed_addr global [1010 x i8], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4spfaib(i32 noundef %0, i1 noundef zeroext %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::queue", align 8
  %5 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4040) @dist, i8 63, i64 4040, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1010) @in_que, i8 0, i64 1010, i1 false)
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %4) #5
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %6 = sext i32 %0 to i64
  %7 = getelementptr inbounds [1010 x i32], ptr @dist, i64 0, i64 %6
  store i32 0, ptr %7, align 4, !tbaa !5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %8 unwind label %22

8:                                                ; preds = %2
  %9 = load i32, ptr %3, align 4, !tbaa !5
  %10 = sext i32 %9 to i64
  %11 = getelementptr inbounds [1010 x i8], ptr @in_que, i64 0, i64 %10
  store i8 1, ptr %11, align 1, !tbaa !9
  %12 = call noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  br i1 %12, label %._crit_edge, label %.lr.ph20

.lr.ph20:                                         ; preds = %8
  %13 = zext i1 %1 to i8
  br label %15

.loopexit:                                        ; preds = %51, %15
  %14 = call noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  br i1 %14, label %._crit_edge, label %15, !llvm.loop !11

15:                                               ; preds = %.lr.ph20, %.loopexit
  %16 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %17 = load i32, ptr %16, align 4, !tbaa !5
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [1010 x i8], ptr @in_que, i64 0, i64 %18
  store i8 0, ptr %19, align 1, !tbaa !9
  %20 = getelementptr inbounds [1010 x i32], ptr @head, i64 0, i64 %18
  %.017 = load i32, ptr %20, align 4, !tbaa !5
  %.not18 = icmp eq i32 %.017, 0
  br i1 %.not18, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %15
  %21 = getelementptr inbounds [1010 x i32], ptr @dist, i64 0, i64 %18
  br label %24

22:                                               ; preds = %2
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %53

24:                                               ; preds = %.lr.ph, %51
  %.019 = phi i32 [ %.017, %.lr.ph ], [ %.0, %51 ]
  %25 = sext i32 %.019 to i64
  %26 = getelementptr inbounds [200010 x %struct.edge], ptr @e, i64 0, i64 %25
  %27 = getelementptr inbounds i8, ptr %26, i64 12
  %28 = load i8, ptr %27, align 4, !tbaa !13, !range !15, !noundef !16
  %.not15 = icmp eq i8 %28, %13
  br i1 %.not15, label %29, label %51

29:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %30 = load i32, ptr %26, align 16, !tbaa !17
  store i32 %30, ptr %5, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [1010 x i32], ptr @dist, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = load i32, ptr %21, align 4, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %26, i64 4
  %36 = load i32, ptr %35, align 4, !tbaa !18
  %37 = add nsw i32 %36, %34
  %38 = icmp sgt i32 %33, %37
  br i1 %38, label %39, label %50

39:                                               ; preds = %29
  store i32 %37, ptr %32, align 4, !tbaa !5
  %40 = getelementptr inbounds [1010 x i8], ptr @in_que, i64 0, i64 %31
  %41 = load i8, ptr %40, align 1, !tbaa !9, !range !15, !noundef !16
  %42 = trunc nuw i8 %41 to i1
  br i1 %42, label %50, label %43

43:                                               ; preds = %39
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %44 unwind label %48

44:                                               ; preds = %43
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [1010 x i8], ptr @in_que, i64 0, i64 %46
  store i8 1, ptr %47, align 1, !tbaa !9
  br label %50

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

50:                                               ; preds = %39, %44, %29
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %51

51:                                               ; preds = %24, %50
  %52 = getelementptr inbounds i8, ptr %26, i64 8
  %.0 = load i32, ptr %52, align 8, !tbaa !5
  %.not = icmp eq i32 %.0, 0
  br i1 %.not, label %.loopexit, label %24, !llvm.loop !19

._crit_edge:                                      ; preds = %.loopexit, %8
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #5
  ret void

53:                                               ; preds = %48, %22
  %.pn = phi { ptr, i32 } [ %49, %48 ], [ %23, %22 ]
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

; 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 @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 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 #3 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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, !10, i64 12}
!14 = !{!"_ZTS4edge", !6, i64 0, !6, i64 4, !6, i64 8, !10, i64 12}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!14, !6, i64 0}
!18 = !{!14, !6, i64 4}
!19 = distinct !{!19, !12}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass