; LLVM IR from PacktPublishing/CPP-Data-Structures-and-Algorithms :: Chapter04/Radix_Sort/Radix_Sort.ll (Z9RadixSortPii)

; 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.Queue = type { i32, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z9RadixSortPii(ptr noundef %0, i32 noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, 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
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %15 = call noalias noundef nonnull ptr @_Znam(i64 noundef 240) #6
  %16 = getelementptr inbounds %class.Queue, ptr %15, i64 10
  br label %17

17:                                               ; preds = %19, %2
  %18 = phi ptr [ %15, %2 ], [ %20, %19 ]
  invoke void @_ZN5QueueIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %19 unwind label %31

19:                                               ; preds = %17
  %20 = getelementptr inbounds %class.Queue, ptr %18, i64 1
  %21 = icmp eq ptr %20, %16
  br i1 %21, label %22, label %17

22:                                               ; preds = %19
  store ptr %15, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = getelementptr inbounds i32, ptr %23, i64 0
  %25 = load i32, ptr %24, align 4, !tbaa !9
  store i32 %25, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %50, %22
  %27 = load i32, ptr %9, align 4, !tbaa !9
  %28 = load i32, ptr %4, align 4, !tbaa !9
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %35, label %30

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

31:                                               ; preds = %17
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %6, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %7, align 4
  call void @_ZdaPvm(ptr noundef %15, i64 noundef 240) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %123

35:                                               ; preds = %26
  %36 = load i32, ptr %8, align 4, !tbaa !9
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = load i32, ptr %9, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds i32, ptr %37, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = icmp slt i32 %36, %41
  br i1 %42, label %43, label %49

43:                                               ; preds = %35
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = load i32, ptr %9, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds i32, ptr %44, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !9
  store i32 %48, ptr %8, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %43, %35
  br label %50

50:                                               ; preds = %49
  %51 = load i32, ptr %9, align 4, !tbaa !9
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %9, align 4, !tbaa !9
  br label %26, !llvm.loop !11

53:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 1, ptr %10, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %119, %53
  %55 = load i32, ptr %8, align 4, !tbaa !9
  %56 = load i32, ptr %10, align 4, !tbaa !9
  %57 = sdiv i32 %55, %56
  %58 = icmp sgt i32 %57, 0
  br i1 %58, label %60, label %59

59:                                               ; preds = %54
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %122

60:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %83, %60
  %62 = load i32, ptr %12, align 4, !tbaa !9
  %63 = load i32, ptr %4, align 4, !tbaa !9
  %64 = icmp slt i32 %62, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %61
  store i32 8, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %86

66:                                               ; preds = %61
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = load i32, ptr %12, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds i32, ptr %68, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !9
  %73 = load i32, ptr %10, align 4, !tbaa !9
  %74 = sdiv i32 %72, %73
  %75 = srem i32 %74, 10
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds %class.Queue, ptr %67, i64 %76
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = load i32, ptr %12, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds i32, ptr %78, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !9
  call void @_ZN5QueueIiE7EnqueueEi(ptr noundef nonnull align 8 dereferenceable(24) %77, i32 noundef %82)
  br label %83

83:                                               ; preds = %66
  %84 = load i32, ptr %12, align 4, !tbaa !9
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %12, align 4, !tbaa !9
  br label %61, !llvm.loop !13

86:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %87

87:                                               ; preds = %115, %86
  %88 = load i32, ptr %14, align 4, !tbaa !9
  %89 = icmp slt i32 %88, 10
  br i1 %89, label %91, label %90

90:                                               ; preds = %87
  store i32 11, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %118

91:                                               ; preds = %87
  br label %92

92:                                               ; preds = %99, %91
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = load i32, ptr %14, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds %class.Queue, ptr %93, i64 %95
  %97 = call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %96)
  %98 = xor i1 %97, true
  br i1 %98, label %99, label %114

99:                                               ; preds = %92
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = load i32, ptr %14, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds %class.Queue, ptr %100, i64 %102
  %104 = call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %103)
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = load i32, ptr %13, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %13, align 4, !tbaa !9
  %108 = sext i32 %106 to i64
  %109 = getelementptr inbounds i32, ptr %105, i64 %108
  store i32 %104, ptr %109, align 4, !tbaa !9
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = load i32, ptr %14, align 4, !tbaa !9
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds %class.Queue, ptr %110, i64 %112
  call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %113)
  br label %92, !llvm.loop !14

114:                                              ; preds = %92
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %14, align 4, !tbaa !9
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %14, align 4, !tbaa !9
  br label %87, !llvm.loop !15

118:                                              ; preds = %90
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %10, align 4, !tbaa !9
  %121 = mul nsw i32 %120, 10
  store i32 %121, ptr %10, align 4, !tbaa !9
  br label %54, !llvm.loop !16

122:                                              ; preds = %59
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret void

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPvm(ptr noundef, i64 noundef) #4

; 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
declare dso_local void @_ZN5QueueIiE7EnqueueEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24)) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nobuiltin allocsize(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 = { nobuiltin nounwind "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 }
attributes #6 = { builtin allocsize(0) }
attributes #7 = { builtin 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


; 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.Queue = type { i32, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z9RadixSortPii(ptr nocapture noundef %0, i32 noundef %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = tail call noalias noundef nonnull dereferenceable(240) ptr @_Znam(i64 noundef 240) #4
  tail call void @_ZN5QueueIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %.ptr.1 = getelementptr inbounds i8, ptr %3, i64 24
  tail call void @_ZN5QueueIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  %.ptr.2 = getelementptr inbounds i8, ptr %3, i64 48
  tail call void @_ZN5QueueIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  %.ptr.3 = getelementptr inbounds i8, ptr %3, i64 72
  tail call void @_ZN5QueueIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.3)
  %.ptr.4 = getelementptr inbounds i8, ptr %3, i64 96
  tail call void @_ZN5QueueIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.4)
  %.ptr.5 = getelementptr inbounds i8, ptr %3, i64 120
  tail call void @_ZN5QueueIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.5)
  %.ptr.6 = getelementptr inbounds i8, ptr %3, i64 144
  tail call void @_ZN5QueueIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.6)
  %.ptr.7 = getelementptr inbounds i8, ptr %3, i64 168
  tail call void @_ZN5QueueIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.7)
  %.ptr.8 = getelementptr inbounds i8, ptr %3, i64 192
  tail call void @_ZN5QueueIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.8)
  %.ptr.9 = getelementptr inbounds i8, ptr %3, i64 216
  tail call void @_ZN5QueueIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.9)
  %4 = load i32, ptr %0, align 4, !tbaa !5
  %5 = icmp sgt i32 %1, 0
  br i1 %5, label %.lr.ph.preheader, label %.preheader41.thread

.lr.ph.preheader:                                 ; preds = %2
  %wide.trip.count = zext nneg i32 %1 to i64
  %min.iters.check = icmp ult i32 %1, 8
  br i1 %min.iters.check, label %.lr.ph.preheader84, label %vector.ph

.lr.ph.preheader84:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  %.03442.ph = phi i32 [ %4, %.lr.ph.preheader ], [ %11, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 2147483640
  %minmax.ident.splatinsert = insertelement <4 x i32> poison, i32 %4, i64 0
  %minmax.ident.splat = shufflevector <4 x i32> %minmax.ident.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %8, %vector.body ]
  %vec.phi81 = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %9, %vector.body ]
  %6 = getelementptr inbounds i32, ptr %0, i64 %index
  %7 = getelementptr inbounds i8, ptr %6, i64 16
  %wide.load = load <4 x i32>, ptr %6, align 4, !tbaa !5
  %wide.load82 = load <4 x i32>, ptr %7, align 4, !tbaa !5
  %8 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %vec.phi, <4 x i32> %wide.load)
  %9 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %vec.phi81, <4 x i32> %wide.load82)
  %index.next = add nuw i64 %index, 8
  %10 = icmp eq i64 %index.next, %n.vec
  br i1 %10, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %rdx.minmax = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %8, <4 x i32> %9)
  %11 = tail call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> %rdx.minmax)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader41, label %.lr.ph.preheader84

.preheader41:                                     ; preds = %.lr.ph, %middle.block
  %spec.select.lcssa = phi i32 [ %11, %middle.block ], [ %spec.select, %.lr.ph ]
  %12 = icmp sgt i32 %spec.select.lcssa, 0
  br i1 %12, label %.preheader40.lr.ph, label %._crit_edge52

.preheader41.thread:                              ; preds = %2
  %13 = icmp sgt i32 %4, 0
  br i1 %13, label %.preheader40.preheader, label %._crit_edge52

.preheader40.lr.ph:                               ; preds = %.preheader41
  br i1 %5, label %.preheader40.us.preheader, label %.preheader40.preheader

.preheader40.preheader:                           ; preds = %.preheader41.thread, %.preheader40.lr.ph
  %.034.lcssa7678 = phi i32 [ %spec.select.lcssa, %.preheader40.lr.ph ], [ %4, %.preheader41.thread ]
  br label %.preheader40

.preheader40.us.preheader:                        ; preds = %.preheader40.lr.ph
  %wide.trip.count66 = zext nneg i32 %1 to i64
  br label %.preheader40.us

.preheader40.us:                                  ; preds = %.preheader40.us.preheader, %._crit_edge.us.9
  %.03251.us = phi i32 [ %71, %._crit_edge.us.9 ], [ 1, %.preheader40.us.preheader ]
  br label %74

.lr.ph47.us:                                      ; preds = %.preheader.us.preheader, %.lr.ph47.us
  %indvars.iv68 = phi i64 [ %indvars.iv.next69, %.lr.ph47.us ], [ 0, %.preheader.us.preheader ]
  %14 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %15 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv68
  store i32 %14, ptr %15, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %16 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  br i1 %16, label %._crit_edge.us.loopexit, label %.lr.ph47.us, !llvm.loop !13

._crit_edge.us.loopexit:                          ; preds = %.lr.ph47.us
  %17 = trunc nsw i64 %indvars.iv.next69 to i32
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %._crit_edge.us.loopexit, %.preheader.us.preheader
  %.1.lcssa.us = phi i32 [ 0, %.preheader.us.preheader ], [ %17, %._crit_edge.us.loopexit ]
  %18 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  br i1 %18, label %._crit_edge.us.1, label %.lr.ph47.us.preheader.1

.lr.ph47.us.preheader.1:                          ; preds = %._crit_edge.us
  %19 = sext i32 %.1.lcssa.us to i64
  br label %.lr.ph47.us.1

.lr.ph47.us.1:                                    ; preds = %.lr.ph47.us.1, %.lr.ph47.us.preheader.1
  %indvars.iv68.1 = phi i64 [ %19, %.lr.ph47.us.preheader.1 ], [ %indvars.iv.next69.1, %.lr.ph47.us.1 ]
  %20 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  %indvars.iv.next69.1 = add nsw i64 %indvars.iv68.1, 1
  %21 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv68.1
  store i32 %20, ptr %21, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  %22 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  br i1 %22, label %._crit_edge.us.loopexit.1, label %.lr.ph47.us.1, !llvm.loop !13

._crit_edge.us.loopexit.1:                        ; preds = %.lr.ph47.us.1
  %23 = trunc nsw i64 %indvars.iv.next69.1 to i32
  br label %._crit_edge.us.1

._crit_edge.us.1:                                 ; preds = %._crit_edge.us.loopexit.1, %._crit_edge.us
  %.1.lcssa.us.1 = phi i32 [ %.1.lcssa.us, %._crit_edge.us ], [ %23, %._crit_edge.us.loopexit.1 ]
  %24 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  br i1 %24, label %._crit_edge.us.2, label %.lr.ph47.us.preheader.2

.lr.ph47.us.preheader.2:                          ; preds = %._crit_edge.us.1
  %25 = sext i32 %.1.lcssa.us.1 to i64
  br label %.lr.ph47.us.2

.lr.ph47.us.2:                                    ; preds = %.lr.ph47.us.2, %.lr.ph47.us.preheader.2
  %indvars.iv68.2 = phi i64 [ %25, %.lr.ph47.us.preheader.2 ], [ %indvars.iv.next69.2, %.lr.ph47.us.2 ]
  %26 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  %indvars.iv.next69.2 = add nsw i64 %indvars.iv68.2, 1
  %27 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv68.2
  store i32 %26, ptr %27, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  %28 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  br i1 %28, label %._crit_edge.us.loopexit.2, label %.lr.ph47.us.2, !llvm.loop !13

._crit_edge.us.loopexit.2:                        ; preds = %.lr.ph47.us.2
  %29 = trunc nsw i64 %indvars.iv.next69.2 to i32
  br label %._crit_edge.us.2

._crit_edge.us.2:                                 ; preds = %._crit_edge.us.loopexit.2, %._crit_edge.us.1
  %.1.lcssa.us.2 = phi i32 [ %.1.lcssa.us.1, %._crit_edge.us.1 ], [ %29, %._crit_edge.us.loopexit.2 ]
  %30 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.3)
  br i1 %30, label %._crit_edge.us.3, label %.lr.ph47.us.preheader.3

.lr.ph47.us.preheader.3:                          ; preds = %._crit_edge.us.2
  %31 = sext i32 %.1.lcssa.us.2 to i64
  br label %.lr.ph47.us.3

.lr.ph47.us.3:                                    ; preds = %.lr.ph47.us.3, %.lr.ph47.us.preheader.3
  %indvars.iv68.3 = phi i64 [ %31, %.lr.ph47.us.preheader.3 ], [ %indvars.iv.next69.3, %.lr.ph47.us.3 ]
  %32 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.3)
  %indvars.iv.next69.3 = add nsw i64 %indvars.iv68.3, 1
  %33 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv68.3
  store i32 %32, ptr %33, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.3)
  %34 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.3)
  br i1 %34, label %._crit_edge.us.loopexit.3, label %.lr.ph47.us.3, !llvm.loop !13

._crit_edge.us.loopexit.3:                        ; preds = %.lr.ph47.us.3
  %35 = trunc nsw i64 %indvars.iv.next69.3 to i32
  br label %._crit_edge.us.3

._crit_edge.us.3:                                 ; preds = %._crit_edge.us.loopexit.3, %._crit_edge.us.2
  %.1.lcssa.us.3 = phi i32 [ %.1.lcssa.us.2, %._crit_edge.us.2 ], [ %35, %._crit_edge.us.loopexit.3 ]
  %36 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.4)
  br i1 %36, label %._crit_edge.us.4, label %.lr.ph47.us.preheader.4

.lr.ph47.us.preheader.4:                          ; preds = %._crit_edge.us.3
  %37 = sext i32 %.1.lcssa.us.3 to i64
  br label %.lr.ph47.us.4

.lr.ph47.us.4:                                    ; preds = %.lr.ph47.us.4, %.lr.ph47.us.preheader.4
  %indvars.iv68.4 = phi i64 [ %37, %.lr.ph47.us.preheader.4 ], [ %indvars.iv.next69.4, %.lr.ph47.us.4 ]
  %38 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.4)
  %indvars.iv.next69.4 = add nsw i64 %indvars.iv68.4, 1
  %39 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv68.4
  store i32 %38, ptr %39, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.4)
  %40 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.4)
  br i1 %40, label %._crit_edge.us.loopexit.4, label %.lr.ph47.us.4, !llvm.loop !13

._crit_edge.us.loopexit.4:                        ; preds = %.lr.ph47.us.4
  %41 = trunc nsw i64 %indvars.iv.next69.4 to i32
  br label %._crit_edge.us.4

._crit_edge.us.4:                                 ; preds = %._crit_edge.us.loopexit.4, %._crit_edge.us.3
  %.1.lcssa.us.4 = phi i32 [ %.1.lcssa.us.3, %._crit_edge.us.3 ], [ %41, %._crit_edge.us.loopexit.4 ]
  %42 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.5)
  br i1 %42, label %._crit_edge.us.5, label %.lr.ph47.us.preheader.5

.lr.ph47.us.preheader.5:                          ; preds = %._crit_edge.us.4
  %43 = sext i32 %.1.lcssa.us.4 to i64
  br label %.lr.ph47.us.5

.lr.ph47.us.5:                                    ; preds = %.lr.ph47.us.5, %.lr.ph47.us.preheader.5
  %indvars.iv68.5 = phi i64 [ %43, %.lr.ph47.us.preheader.5 ], [ %indvars.iv.next69.5, %.lr.ph47.us.5 ]
  %44 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.5)
  %indvars.iv.next69.5 = add nsw i64 %indvars.iv68.5, 1
  %45 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv68.5
  store i32 %44, ptr %45, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.5)
  %46 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.5)
  br i1 %46, label %._crit_edge.us.loopexit.5, label %.lr.ph47.us.5, !llvm.loop !13

._crit_edge.us.loopexit.5:                        ; preds = %.lr.ph47.us.5
  %47 = trunc nsw i64 %indvars.iv.next69.5 to i32
  br label %._crit_edge.us.5

._crit_edge.us.5:                                 ; preds = %._crit_edge.us.loopexit.5, %._crit_edge.us.4
  %.1.lcssa.us.5 = phi i32 [ %.1.lcssa.us.4, %._crit_edge.us.4 ], [ %47, %._crit_edge.us.loopexit.5 ]
  %48 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.6)
  br i1 %48, label %._crit_edge.us.6, label %.lr.ph47.us.preheader.6

.lr.ph47.us.preheader.6:                          ; preds = %._crit_edge.us.5
  %49 = sext i32 %.1.lcssa.us.5 to i64
  br label %.lr.ph47.us.6

.lr.ph47.us.6:                                    ; preds = %.lr.ph47.us.6, %.lr.ph47.us.preheader.6
  %indvars.iv68.6 = phi i64 [ %49, %.lr.ph47.us.preheader.6 ], [ %indvars.iv.next69.6, %.lr.ph47.us.6 ]
  %50 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.6)
  %indvars.iv.next69.6 = add nsw i64 %indvars.iv68.6, 1
  %51 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv68.6
  store i32 %50, ptr %51, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.6)
  %52 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.6)
  br i1 %52, label %._crit_edge.us.loopexit.6, label %.lr.ph47.us.6, !llvm.loop !13

._crit_edge.us.loopexit.6:                        ; preds = %.lr.ph47.us.6
  %53 = trunc nsw i64 %indvars.iv.next69.6 to i32
  br label %._crit_edge.us.6

._crit_edge.us.6:                                 ; preds = %._crit_edge.us.loopexit.6, %._crit_edge.us.5
  %.1.lcssa.us.6 = phi i32 [ %.1.lcssa.us.5, %._crit_edge.us.5 ], [ %53, %._crit_edge.us.loopexit.6 ]
  %54 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.7)
  br i1 %54, label %._crit_edge.us.7, label %.lr.ph47.us.preheader.7

.lr.ph47.us.preheader.7:                          ; preds = %._crit_edge.us.6
  %55 = sext i32 %.1.lcssa.us.6 to i64
  br label %.lr.ph47.us.7

.lr.ph47.us.7:                                    ; preds = %.lr.ph47.us.7, %.lr.ph47.us.preheader.7
  %indvars.iv68.7 = phi i64 [ %55, %.lr.ph47.us.preheader.7 ], [ %indvars.iv.next69.7, %.lr.ph47.us.7 ]
  %56 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.7)
  %indvars.iv.next69.7 = add nsw i64 %indvars.iv68.7, 1
  %57 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv68.7
  store i32 %56, ptr %57, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.7)
  %58 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.7)
  br i1 %58, label %._crit_edge.us.loopexit.7, label %.lr.ph47.us.7, !llvm.loop !13

._crit_edge.us.loopexit.7:                        ; preds = %.lr.ph47.us.7
  %59 = trunc nsw i64 %indvars.iv.next69.7 to i32
  br label %._crit_edge.us.7

._crit_edge.us.7:                                 ; preds = %._crit_edge.us.loopexit.7, %._crit_edge.us.6
  %.1.lcssa.us.7 = phi i32 [ %.1.lcssa.us.6, %._crit_edge.us.6 ], [ %59, %._crit_edge.us.loopexit.7 ]
  %60 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.8)
  br i1 %60, label %._crit_edge.us.8, label %.lr.ph47.us.preheader.8

.lr.ph47.us.preheader.8:                          ; preds = %._crit_edge.us.7
  %61 = sext i32 %.1.lcssa.us.7 to i64
  br label %.lr.ph47.us.8

.lr.ph47.us.8:                                    ; preds = %.lr.ph47.us.8, %.lr.ph47.us.preheader.8
  %indvars.iv68.8 = phi i64 [ %61, %.lr.ph47.us.preheader.8 ], [ %indvars.iv.next69.8, %.lr.ph47.us.8 ]
  %62 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.8)
  %indvars.iv.next69.8 = add nsw i64 %indvars.iv68.8, 1
  %63 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv68.8
  store i32 %62, ptr %63, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.8)
  %64 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.8)
  br i1 %64, label %._crit_edge.us.loopexit.8, label %.lr.ph47.us.8, !llvm.loop !13

._crit_edge.us.loopexit.8:                        ; preds = %.lr.ph47.us.8
  %65 = trunc nsw i64 %indvars.iv.next69.8 to i32
  br label %._crit_edge.us.8

._crit_edge.us.8:                                 ; preds = %._crit_edge.us.loopexit.8, %._crit_edge.us.7
  %.1.lcssa.us.8 = phi i32 [ %.1.lcssa.us.7, %._crit_edge.us.7 ], [ %65, %._crit_edge.us.loopexit.8 ]
  %66 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.9)
  br i1 %66, label %._crit_edge.us.9, label %.lr.ph47.us.preheader.9

.lr.ph47.us.preheader.9:                          ; preds = %._crit_edge.us.8
  %67 = sext i32 %.1.lcssa.us.8 to i64
  br label %.lr.ph47.us.9

.lr.ph47.us.9:                                    ; preds = %.lr.ph47.us.9, %.lr.ph47.us.preheader.9
  %indvars.iv68.9 = phi i64 [ %67, %.lr.ph47.us.preheader.9 ], [ %indvars.iv.next69.9, %.lr.ph47.us.9 ]
  %68 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.9)
  %indvars.iv.next69.9 = add nsw i64 %indvars.iv68.9, 1
  %69 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv68.9
  store i32 %68, ptr %69, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.9)
  %70 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.9)
  br i1 %70, label %._crit_edge.us.9, label %.lr.ph47.us.9, !llvm.loop !13

._crit_edge.us.9:                                 ; preds = %.lr.ph47.us.9, %._crit_edge.us.8
  %71 = mul nuw nsw i32 %.03251.us, 10
  %72 = udiv i32 %spec.select.lcssa, %71
  %73 = icmp sgt i32 %72, 0
  br i1 %73, label %.preheader40.us, label %._crit_edge52, !llvm.loop !14

74:                                               ; preds = %.preheader40.us, %74
  %indvars.iv63 = phi i64 [ 0, %.preheader40.us ], [ %indvars.iv.next64, %74 ]
  %75 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv63
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = sdiv i32 %76, %.03251.us
  %78 = srem i32 %77, 10
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds %class.Queue, ptr %3, i64 %79
  tail call void @_ZN5QueueIiE7EnqueueEi(ptr noundef nonnull align 8 dereferenceable(24) %80, i32 noundef %76)
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %exitcond67.not = icmp eq i64 %indvars.iv.next64, %wide.trip.count66
  br i1 %exitcond67.not, label %.preheader.us.preheader, label %74, !llvm.loop !15

.preheader.us.preheader:                          ; preds = %74
  %81 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  br i1 %81, label %._crit_edge.us, label %.lr.ph47.us

.lr.ph:                                           ; preds = %.lr.ph.preheader84, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader84 ]
  %.03442 = phi i32 [ %spec.select, %.lr.ph ], [ %.03442.ph, %.lr.ph.preheader84 ]
  %82 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %spec.select = tail call i32 @llvm.smax.i32(i32 %.03442, i32 %83)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader41, label %.lr.ph, !llvm.loop !16

.preheader40:                                     ; preds = %.preheader40.preheader, %._crit_edge.9
  %.03251 = phi i32 [ %142, %._crit_edge.9 ], [ 1, %.preheader40.preheader ]
  %84 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  br i1 %84, label %._crit_edge, label %.lr.ph47

._crit_edge52:                                    ; preds = %._crit_edge.9, %._crit_edge.us.9, %.preheader41.thread, %.preheader41
  ret void

.lr.ph47:                                         ; preds = %.preheader40, %.lr.ph47
  %indvars.iv56 = phi i64 [ %indvars.iv.next57, %.lr.ph47 ], [ 0, %.preheader40 ]
  %85 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %86 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv56
  store i32 %85, ptr %86, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %87 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  br i1 %87, label %._crit_edge.loopexit, label %.lr.ph47, !llvm.loop !13

._crit_edge.loopexit:                             ; preds = %.lr.ph47
  %88 = trunc nsw i64 %indvars.iv.next57 to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader40
  %.1.lcssa = phi i32 [ 0, %.preheader40 ], [ %88, %._crit_edge.loopexit ]
  %89 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  br i1 %89, label %._crit_edge.1, label %.lr.ph47.preheader.1

.lr.ph47.preheader.1:                             ; preds = %._crit_edge
  %90 = sext i32 %.1.lcssa to i64
  br label %.lr.ph47.1

.lr.ph47.1:                                       ; preds = %.lr.ph47.1, %.lr.ph47.preheader.1
  %indvars.iv56.1 = phi i64 [ %90, %.lr.ph47.preheader.1 ], [ %indvars.iv.next57.1, %.lr.ph47.1 ]
  %91 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  %indvars.iv.next57.1 = add nsw i64 %indvars.iv56.1, 1
  %92 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv56.1
  store i32 %91, ptr %92, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  %93 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  br i1 %93, label %._crit_edge.loopexit.1, label %.lr.ph47.1, !llvm.loop !13

._crit_edge.loopexit.1:                           ; preds = %.lr.ph47.1
  %94 = trunc nsw i64 %indvars.iv.next57.1 to i32
  br label %._crit_edge.1

._crit_edge.1:                                    ; preds = %._crit_edge.loopexit.1, %._crit_edge
  %.1.lcssa.1 = phi i32 [ %.1.lcssa, %._crit_edge ], [ %94, %._crit_edge.loopexit.1 ]
  %95 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  br i1 %95, label %._crit_edge.2, label %.lr.ph47.preheader.2

.lr.ph47.preheader.2:                             ; preds = %._crit_edge.1
  %96 = sext i32 %.1.lcssa.1 to i64
  br label %.lr.ph47.2

.lr.ph47.2:                                       ; preds = %.lr.ph47.2, %.lr.ph47.preheader.2
  %indvars.iv56.2 = phi i64 [ %96, %.lr.ph47.preheader.2 ], [ %indvars.iv.next57.2, %.lr.ph47.2 ]
  %97 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  %indvars.iv.next57.2 = add nsw i64 %indvars.iv56.2, 1
  %98 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv56.2
  store i32 %97, ptr %98, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  %99 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  br i1 %99, label %._crit_edge.loopexit.2, label %.lr.ph47.2, !llvm.loop !13

._crit_edge.loopexit.2:                           ; preds = %.lr.ph47.2
  %100 = trunc nsw i64 %indvars.iv.next57.2 to i32
  br label %._crit_edge.2

._crit_edge.2:                                    ; preds = %._crit_edge.loopexit.2, %._crit_edge.1
  %.1.lcssa.2 = phi i32 [ %.1.lcssa.1, %._crit_edge.1 ], [ %100, %._crit_edge.loopexit.2 ]
  %101 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.3)
  br i1 %101, label %._crit_edge.3, label %.lr.ph47.preheader.3

.lr.ph47.preheader.3:                             ; preds = %._crit_edge.2
  %102 = sext i32 %.1.lcssa.2 to i64
  br label %.lr.ph47.3

.lr.ph47.3:                                       ; preds = %.lr.ph47.3, %.lr.ph47.preheader.3
  %indvars.iv56.3 = phi i64 [ %102, %.lr.ph47.preheader.3 ], [ %indvars.iv.next57.3, %.lr.ph47.3 ]
  %103 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.3)
  %indvars.iv.next57.3 = add nsw i64 %indvars.iv56.3, 1
  %104 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv56.3
  store i32 %103, ptr %104, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.3)
  %105 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.3)
  br i1 %105, label %._crit_edge.loopexit.3, label %.lr.ph47.3, !llvm.loop !13

._crit_edge.loopexit.3:                           ; preds = %.lr.ph47.3
  %106 = trunc nsw i64 %indvars.iv.next57.3 to i32
  br label %._crit_edge.3

._crit_edge.3:                                    ; preds = %._crit_edge.loopexit.3, %._crit_edge.2
  %.1.lcssa.3 = phi i32 [ %.1.lcssa.2, %._crit_edge.2 ], [ %106, %._crit_edge.loopexit.3 ]
  %107 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.4)
  br i1 %107, label %._crit_edge.4, label %.lr.ph47.preheader.4

.lr.ph47.preheader.4:                             ; preds = %._crit_edge.3
  %108 = sext i32 %.1.lcssa.3 to i64
  br label %.lr.ph47.4

.lr.ph47.4:                                       ; preds = %.lr.ph47.4, %.lr.ph47.preheader.4
  %indvars.iv56.4 = phi i64 [ %108, %.lr.ph47.preheader.4 ], [ %indvars.iv.next57.4, %.lr.ph47.4 ]
  %109 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.4)
  %indvars.iv.next57.4 = add nsw i64 %indvars.iv56.4, 1
  %110 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv56.4
  store i32 %109, ptr %110, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.4)
  %111 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.4)
  br i1 %111, label %._crit_edge.loopexit.4, label %.lr.ph47.4, !llvm.loop !13

._crit_edge.loopexit.4:                           ; preds = %.lr.ph47.4
  %112 = trunc nsw i64 %indvars.iv.next57.4 to i32
  br label %._crit_edge.4

._crit_edge.4:                                    ; preds = %._crit_edge.loopexit.4, %._crit_edge.3
  %.1.lcssa.4 = phi i32 [ %.1.lcssa.3, %._crit_edge.3 ], [ %112, %._crit_edge.loopexit.4 ]
  %113 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.5)
  br i1 %113, label %._crit_edge.5, label %.lr.ph47.preheader.5

.lr.ph47.preheader.5:                             ; preds = %._crit_edge.4
  %114 = sext i32 %.1.lcssa.4 to i64
  br label %.lr.ph47.5

.lr.ph47.5:                                       ; preds = %.lr.ph47.5, %.lr.ph47.preheader.5
  %indvars.iv56.5 = phi i64 [ %114, %.lr.ph47.preheader.5 ], [ %indvars.iv.next57.5, %.lr.ph47.5 ]
  %115 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.5)
  %indvars.iv.next57.5 = add nsw i64 %indvars.iv56.5, 1
  %116 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv56.5
  store i32 %115, ptr %116, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.5)
  %117 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.5)
  br i1 %117, label %._crit_edge.loopexit.5, label %.lr.ph47.5, !llvm.loop !13

._crit_edge.loopexit.5:                           ; preds = %.lr.ph47.5
  %118 = trunc nsw i64 %indvars.iv.next57.5 to i32
  br label %._crit_edge.5

._crit_edge.5:                                    ; preds = %._crit_edge.loopexit.5, %._crit_edge.4
  %.1.lcssa.5 = phi i32 [ %.1.lcssa.4, %._crit_edge.4 ], [ %118, %._crit_edge.loopexit.5 ]
  %119 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.6)
  br i1 %119, label %._crit_edge.6, label %.lr.ph47.preheader.6

.lr.ph47.preheader.6:                             ; preds = %._crit_edge.5
  %120 = sext i32 %.1.lcssa.5 to i64
  br label %.lr.ph47.6

.lr.ph47.6:                                       ; preds = %.lr.ph47.6, %.lr.ph47.preheader.6
  %indvars.iv56.6 = phi i64 [ %120, %.lr.ph47.preheader.6 ], [ %indvars.iv.next57.6, %.lr.ph47.6 ]
  %121 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.6)
  %indvars.iv.next57.6 = add nsw i64 %indvars.iv56.6, 1
  %122 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv56.6
  store i32 %121, ptr %122, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.6)
  %123 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.6)
  br i1 %123, label %._crit_edge.loopexit.6, label %.lr.ph47.6, !llvm.loop !13

._crit_edge.loopexit.6:                           ; preds = %.lr.ph47.6
  %124 = trunc nsw i64 %indvars.iv.next57.6 to i32
  br label %._crit_edge.6

._crit_edge.6:                                    ; preds = %._crit_edge.loopexit.6, %._crit_edge.5
  %.1.lcssa.6 = phi i32 [ %.1.lcssa.5, %._crit_edge.5 ], [ %124, %._crit_edge.loopexit.6 ]
  %125 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.7)
  br i1 %125, label %._crit_edge.7, label %.lr.ph47.preheader.7

.lr.ph47.preheader.7:                             ; preds = %._crit_edge.6
  %126 = sext i32 %.1.lcssa.6 to i64
  br label %.lr.ph47.7

.lr.ph47.7:                                       ; preds = %.lr.ph47.7, %.lr.ph47.preheader.7
  %indvars.iv56.7 = phi i64 [ %126, %.lr.ph47.preheader.7 ], [ %indvars.iv.next57.7, %.lr.ph47.7 ]
  %127 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.7)
  %indvars.iv.next57.7 = add nsw i64 %indvars.iv56.7, 1
  %128 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv56.7
  store i32 %127, ptr %128, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.7)
  %129 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.7)
  br i1 %129, label %._crit_edge.loopexit.7, label %.lr.ph47.7, !llvm.loop !13

._crit_edge.loopexit.7:                           ; preds = %.lr.ph47.7
  %130 = trunc nsw i64 %indvars.iv.next57.7 to i32
  br label %._crit_edge.7

._crit_edge.7:                                    ; preds = %._crit_edge.loopexit.7, %._crit_edge.6
  %.1.lcssa.7 = phi i32 [ %.1.lcssa.6, %._crit_edge.6 ], [ %130, %._crit_edge.loopexit.7 ]
  %131 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.8)
  br i1 %131, label %._crit_edge.8, label %.lr.ph47.preheader.8

.lr.ph47.preheader.8:                             ; preds = %._crit_edge.7
  %132 = sext i32 %.1.lcssa.7 to i64
  br label %.lr.ph47.8

.lr.ph47.8:                                       ; preds = %.lr.ph47.8, %.lr.ph47.preheader.8
  %indvars.iv56.8 = phi i64 [ %132, %.lr.ph47.preheader.8 ], [ %indvars.iv.next57.8, %.lr.ph47.8 ]
  %133 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.8)
  %indvars.iv.next57.8 = add nsw i64 %indvars.iv56.8, 1
  %134 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv56.8
  store i32 %133, ptr %134, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.8)
  %135 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.8)
  br i1 %135, label %._crit_edge.loopexit.8, label %.lr.ph47.8, !llvm.loop !13

._crit_edge.loopexit.8:                           ; preds = %.lr.ph47.8
  %136 = trunc nsw i64 %indvars.iv.next57.8 to i32
  br label %._crit_edge.8

._crit_edge.8:                                    ; preds = %._crit_edge.loopexit.8, %._crit_edge.7
  %.1.lcssa.8 = phi i32 [ %.1.lcssa.7, %._crit_edge.7 ], [ %136, %._crit_edge.loopexit.8 ]
  %137 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.9)
  br i1 %137, label %._crit_edge.9, label %.lr.ph47.preheader.9

.lr.ph47.preheader.9:                             ; preds = %._crit_edge.8
  %138 = sext i32 %.1.lcssa.8 to i64
  br label %.lr.ph47.9

.lr.ph47.9:                                       ; preds = %.lr.ph47.9, %.lr.ph47.preheader.9
  %indvars.iv56.9 = phi i64 [ %138, %.lr.ph47.preheader.9 ], [ %indvars.iv.next57.9, %.lr.ph47.9 ]
  %139 = tail call noundef i32 @_ZN5QueueIiE5FrontEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.9)
  %indvars.iv.next57.9 = add nsw i64 %indvars.iv56.9, 1
  %140 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv56.9
  store i32 %139, ptr %140, align 4, !tbaa !5
  tail call void @_ZN5QueueIiE7DequeueEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.9)
  %141 = tail call noundef zeroext i1 @_ZN5QueueIiE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.9)
  br i1 %141, label %._crit_edge.9, label %.lr.ph47.9, !llvm.loop !13

._crit_edge.9:                                    ; preds = %.lr.ph47.9, %._crit_edge.8
  %142 = mul nuw nsw i32 %.03251, 10
  %143 = udiv i32 %.034.lcssa7678, %142
  %144 = icmp sgt i32 %143, 0
  br i1 %144, label %.preheader40, label %._crit_edge52, !llvm.loop !14
}

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #1

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.smax.v4i32(<4 x i32>, <4 x i32>) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.smax.v4i32(<4 x i32>) #3

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

!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 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10, !12, !11}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass