; LLVM IR from JessonYue/LeetCodeLearning :: Array/zhangjunwei/queue (MyQueue_6_17)

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @myQueuePop(ptr noundef %0) #1 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #2
  store i32 -1, ptr %4, align 4, !tbaa !9
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = call zeroext i1 @myQueueEmpty(ptr noundef %8)
  br i1 %9, label %10, label %12

10:                                               ; preds = %1
  %11 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %11, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %90

12:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #2
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #2
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.MyQueue, ptr %13, i32 0, i32 2
  %15 = load i32, ptr %14, align 8, !tbaa !11
  store i32 %15, ptr %7, align 4, !tbaa !9
  br label %16

16:                                               ; preds = %19, %12
  %17 = load i32, ptr %7, align 4, !tbaa !9
  %18 = icmp sge i32 %17, 0
  br i1 %18, label %19, label %41

19:                                               ; preds = %16
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.MyQueue, ptr %20, i32 0, i32 0
  %22 = load ptr, ptr %21, align 8, !tbaa !13
  %23 = load i32, ptr %7, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds i32, ptr %22, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !9
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.MyQueue, ptr %27, i32 0, i32 1
  %29 = load ptr, ptr %28, align 8, !tbaa !14
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %6, align 4, !tbaa !9
  %32 = sext i32 %30 to i64
  %33 = getelementptr inbounds i32, ptr %29, i64 %32
  store i32 %26, ptr %33, align 4, !tbaa !9
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.MyQueue, ptr %34, i32 0, i32 0
  %36 = load ptr, ptr %35, align 8, !tbaa !13
  %37 = load i32, ptr %7, align 4, !tbaa !9
  %38 = add nsw i32 %37, -1
  store i32 %38, ptr %7, align 4, !tbaa !9
  %39 = sext i32 %37 to i64
  %40 = getelementptr inbounds i32, ptr %36, i64 %39
  store i32 0, ptr %40, align 4, !tbaa !9
  br label %16, !llvm.loop !15

41:                                               ; preds = %16
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.MyQueue, ptr %42, i32 0, i32 1
  %44 = load ptr, ptr %43, align 8, !tbaa !14
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.MyQueue, ptr %45, i32 0, i32 2
  %47 = load i32, ptr %46, align 8, !tbaa !11
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds i32, ptr %44, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !9
  store i32 %50, ptr %4, align 4, !tbaa !9
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.MyQueue, ptr %51, i32 0, i32 1
  %53 = load ptr, ptr %52, align 8, !tbaa !14
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.MyQueue, ptr %54, i32 0, i32 2
  %56 = load i32, ptr %55, align 8, !tbaa !11
  %57 = add nsw i32 %56, -1
  store i32 %57, ptr %55, align 8, !tbaa !11
  %58 = sext i32 %56 to i64
  %59 = getelementptr inbounds i32, ptr %53, i64 %58
  store i32 0, ptr %59, align 4, !tbaa !9
  store i32 0, ptr %6, align 4, !tbaa !9
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.MyQueue, ptr %60, i32 0, i32 2
  %62 = load i32, ptr %61, align 8, !tbaa !11
  store i32 %62, ptr %7, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %66, %41
  %64 = load i32, ptr %7, align 4, !tbaa !9
  %65 = icmp sge i32 %64, 0
  br i1 %65, label %66, label %88

66:                                               ; preds = %63
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.MyQueue, ptr %67, i32 0, i32 1
  %69 = load ptr, ptr %68, align 8, !tbaa !14
  %70 = load i32, ptr %7, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %69, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !9
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.MyQueue, ptr %74, i32 0, i32 0
  %76 = load ptr, ptr %75, align 8, !tbaa !13
  %77 = load i32, ptr %6, align 4, !tbaa !9
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %6, align 4, !tbaa !9
  %79 = sext i32 %77 to i64
  %80 = getelementptr inbounds i32, ptr %76, i64 %79
  store i32 %73, ptr %80, align 4, !tbaa !9
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.MyQueue, ptr %81, i32 0, i32 1
  %83 = load ptr, ptr %82, align 8, !tbaa !14
  %84 = load i32, ptr %7, align 4, !tbaa !9
  %85 = add nsw i32 %84, -1
  store i32 %85, ptr %7, align 4, !tbaa !9
  %86 = sext i32 %84 to i64
  %87 = getelementptr inbounds i32, ptr %83, i64 %86
  store i32 0, ptr %87, align 4, !tbaa !9
  br label %63, !llvm.loop !17

88:                                               ; preds = %63
  %89 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %89, ptr %2, align 4
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #2
  br label %90

90:                                               ; preds = %88, %10
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #2
  %91 = load i32, ptr %2, align 4
  ret i32 %91
}

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @myQueueEmpty(ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"", !6, i64 0, !6, i64 8, !10, i64 16}
!13 = !{!12, !6, i64 0}
!14 = !{!12, !6, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


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

; Function Attrs: nounwind uwtable
define dso_local i32 @myQueuePop(ptr noundef %0) local_unnamed_addr #0 {
  %2 = tail call zeroext i1 @myQueueEmpty(ptr noundef %0)
  br i1 %2, label %.loopexit, label %3

3:                                                ; preds = %1
  %4 = getelementptr inbounds i8, ptr %0, i64 16
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = icmp sgt i32 %5, -1
  br i1 %6, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %3
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 8
  %.pre = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !11
  br label %._crit_edge

.lr.ph:                                           ; preds = %3
  %7 = load ptr, ptr %0, align 8, !tbaa !12
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !11
  %10 = zext nneg i32 %5 to i64
  %11 = add nuw i32 %5, 1
  %wide.trip.count = zext i32 %11 to i64
  %min.iters.check = icmp ult i32 %5, 15
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph
  %12 = shl nuw nsw i64 %wide.trip.count, 2
  %scevgep = getelementptr i8, ptr %9, i64 %12
  %13 = shl nuw nsw i64 %10, 2
  %14 = add nuw nsw i64 %13, 4
  %15 = sub nsw i64 %14, %12
  %scevgep47 = getelementptr i8, ptr %7, i64 %15
  %16 = getelementptr i8, ptr %7, i64 %13
  %scevgep48 = getelementptr i8, ptr %16, i64 4
  %bound0 = icmp ult ptr %9, %scevgep48
  %bound1 = icmp ult ptr %scevgep47, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count, 4294967288
  %ind.end = sub nsw i64 %10, %n.vec
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = sub i64 %10, %index
  %17 = getelementptr inbounds i32, ptr %7, i64 %offset.idx
  %18 = getelementptr inbounds i8, ptr %17, i64 -12
  %19 = getelementptr inbounds i8, ptr %17, i64 -28
  %wide.load = load <4 x i32>, ptr %18, align 4, !tbaa !13, !alias.scope !14
  %reverse = shufflevector <4 x i32> %wide.load, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %wide.load50 = load <4 x i32>, ptr %19, align 4, !tbaa !13, !alias.scope !14
  %reverse51 = shufflevector <4 x i32> %wide.load50, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %20 = getelementptr inbounds i32, ptr %9, i64 %index
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  store <4 x i32> %reverse, ptr %20, align 4, !tbaa !13, !alias.scope !17, !noalias !14
  store <4 x i32> %reverse51, ptr %21, align 4, !tbaa !13, !alias.scope !17, !noalias !14
  store <4 x i32> zeroinitializer, ptr %18, align 4, !tbaa !13, !alias.scope !14
  store <4 x i32> zeroinitializer, ptr %19, align 4, !tbaa !13, !alias.scope !14
  %index.next = add nuw i64 %index, 8
  %22 = icmp eq i64 %index.next, %n.vec
  br i1 %22, label %middle.block, label %vector.body, !llvm.loop !19

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge.loopexit, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph
  %indvars.iv32.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %indvars.iv.ph = phi i64 [ %10, %vector.memcheck ], [ %10, %.lr.ph ], [ %ind.end, %middle.block ]
  %23 = zext nneg i32 %5 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %24 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv.ph
  %25 = load i32, ptr %24, align 4, !tbaa !13
  %indvars.iv.next33.prol = or disjoint i64 %indvars.iv32.ph, 1
  %26 = getelementptr inbounds i32, ptr %9, i64 %indvars.iv32.ph
  store i32 %25, ptr %26, align 4, !tbaa !13
  %indvars.iv.next.prol = add nsw i64 %indvars.iv.ph, -1
  store i32 0, ptr %24, align 4, !tbaa !13
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv32.unr = phi i64 [ %indvars.iv32.ph, %scalar.ph.preheader ], [ %indvars.iv.next33.prol, %scalar.ph.prol ]
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %27 = icmp eq i64 %indvars.iv32.ph, %23
  br i1 %27, label %._crit_edge.loopexit, label %scalar.ph.preheader.new

scalar.ph.preheader.new:                          ; preds = %scalar.ph.prol.loopexit
  %invariant.gep = getelementptr i8, ptr %7, i64 -4
  %invariant.gep79 = getelementptr i8, ptr %9, i64 4
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph, %scalar.ph.preheader.new
  %indvars.iv32 = phi i64 [ %indvars.iv32.unr, %scalar.ph.preheader.new ], [ %indvars.iv.next33.1, %scalar.ph ]
  %indvars.iv = phi i64 [ %indvars.iv.unr, %scalar.ph.preheader.new ], [ %indvars.iv.next.1, %scalar.ph ]
  %28 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv
  %29 = load i32, ptr %28, align 4, !tbaa !13
  %30 = getelementptr inbounds i32, ptr %9, i64 %indvars.iv32
  store i32 %29, ptr %30, align 4, !tbaa !13
  store i32 0, ptr %28, align 4, !tbaa !13
  %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv
  %31 = load i32, ptr %gep, align 4, !tbaa !13
  %indvars.iv.next33.1 = add nuw nsw i64 %indvars.iv32, 2
  %gep80 = getelementptr i32, ptr %invariant.gep79, i64 %indvars.iv32
  store i32 %31, ptr %gep80, align 4, !tbaa !13
  %indvars.iv.next.1 = add nsw i64 %indvars.iv, -2
  store i32 0, ptr %gep, align 4, !tbaa !13
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next33.1, %wide.trip.count
  br i1 %exitcond.not.1, label %._crit_edge.loopexit, label %scalar.ph, !llvm.loop !23

._crit_edge.loopexit:                             ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %.pre46 = load i32, ptr %4, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %.._crit_edge_crit_edge, %._crit_edge.loopexit
  %32 = phi i32 [ %5, %.._crit_edge_crit_edge ], [ %.pre46, %._crit_edge.loopexit ]
  %33 = phi ptr [ %.pre, %.._crit_edge_crit_edge ], [ %9, %._crit_edge.loopexit ]
  %34 = sext i32 %32 to i64
  %35 = getelementptr inbounds i32, ptr %33, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !13
  %37 = add nsw i32 %32, -1
  store i32 %37, ptr %4, align 8, !tbaa !5
  store i32 0, ptr %35, align 4, !tbaa !13
  %38 = load i32, ptr %4, align 8, !tbaa !5
  %39 = icmp sgt i32 %38, -1
  br i1 %39, label %.lr.ph31, label %.loopexit

.lr.ph31:                                         ; preds = %._crit_edge
  %40 = load ptr, ptr %0, align 8, !tbaa !12
  %41 = zext nneg i32 %38 to i64
  %42 = add nuw i32 %38, 1
  %wide.trip.count44 = zext i32 %42 to i64
  %min.iters.check61 = icmp ult i32 %38, 15
  br i1 %min.iters.check61, label %scalar.ph60.preheader, label %vector.memcheck52

vector.memcheck52:                                ; preds = %.lr.ph31
  %43 = shl nuw nsw i64 %wide.trip.count44, 2
  %scevgep53 = getelementptr i8, ptr %40, i64 %43
  %44 = shl nuw nsw i64 %41, 2
  %45 = add nuw nsw i64 %44, 4
  %46 = sub nsw i64 %45, %43
  %scevgep54 = getelementptr i8, ptr %33, i64 %46
  %47 = add nuw nsw i64 %44, 4
  %scevgep55 = getelementptr i8, ptr %33, i64 %47
  %bound056 = icmp ult ptr %40, %scevgep55
  %bound157 = icmp ult ptr %scevgep54, %scevgep53
  %found.conflict58 = and i1 %bound056, %bound157
  br i1 %found.conflict58, label %scalar.ph60.preheader, label %vector.ph62

vector.ph62:                                      ; preds = %vector.memcheck52
  %n.vec64 = and i64 %wide.trip.count44, 4294967288
  %ind.end66 = sub nsw i64 %41, %n.vec64
  br label %vector.body68

vector.body68:                                    ; preds = %vector.body68, %vector.ph62
  %index69 = phi i64 [ 0, %vector.ph62 ], [ %index.next75, %vector.body68 ]
  %offset.idx70 = sub i64 %41, %index69
  %48 = getelementptr inbounds i32, ptr %33, i64 %offset.idx70
  %49 = getelementptr inbounds i8, ptr %48, i64 -12
  %50 = getelementptr inbounds i8, ptr %48, i64 -28
  %wide.load71 = load <4 x i32>, ptr %49, align 4, !tbaa !13, !alias.scope !24
  %reverse72 = shufflevector <4 x i32> %wide.load71, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %wide.load73 = load <4 x i32>, ptr %50, align 4, !tbaa !13, !alias.scope !24
  %reverse74 = shufflevector <4 x i32> %wide.load73, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %51 = getelementptr inbounds i32, ptr %40, i64 %index69
  %52 = getelementptr inbounds i8, ptr %51, i64 16
  store <4 x i32> %reverse72, ptr %51, align 4, !tbaa !13, !alias.scope !27, !noalias !24
  store <4 x i32> %reverse74, ptr %52, align 4, !tbaa !13, !alias.scope !27, !noalias !24
  store <4 x i32> zeroinitializer, ptr %49, align 4, !tbaa !13, !alias.scope !24
  store <4 x i32> zeroinitializer, ptr %50, align 4, !tbaa !13, !alias.scope !24
  %index.next75 = add nuw i64 %index69, 8
  %53 = icmp eq i64 %index.next75, %n.vec64
  br i1 %53, label %middle.block59, label %vector.body68, !llvm.loop !29

middle.block59:                                   ; preds = %vector.body68
  %cmp.n76 = icmp eq i64 %n.vec64, %wide.trip.count44
  br i1 %cmp.n76, label %.loopexit, label %scalar.ph60.preheader

scalar.ph60.preheader:                            ; preds = %middle.block59, %vector.memcheck52, %.lr.ph31
  %indvars.iv39.ph = phi i64 [ 0, %vector.memcheck52 ], [ 0, %.lr.ph31 ], [ %n.vec64, %middle.block59 ]
  %indvars.iv37.ph = phi i64 [ %41, %vector.memcheck52 ], [ %41, %.lr.ph31 ], [ %ind.end66, %middle.block59 ]
  %54 = zext nneg i32 %38 to i64
  %xtraiter77 = and i64 %wide.trip.count44, 1
  %lcmp.mod78.not = icmp eq i64 %xtraiter77, 0
  br i1 %lcmp.mod78.not, label %scalar.ph60.prol.loopexit, label %scalar.ph60.prol

scalar.ph60.prol:                                 ; preds = %scalar.ph60.preheader
  %55 = getelementptr inbounds i32, ptr %33, i64 %indvars.iv37.ph
  %56 = load i32, ptr %55, align 4, !tbaa !13
  %indvars.iv.next40.prol = or disjoint i64 %indvars.iv39.ph, 1
  %57 = getelementptr inbounds i32, ptr %40, i64 %indvars.iv39.ph
  store i32 %56, ptr %57, align 4, !tbaa !13
  %indvars.iv.next38.prol = add nsw i64 %indvars.iv37.ph, -1
  store i32 0, ptr %55, align 4, !tbaa !13
  br label %scalar.ph60.prol.loopexit

scalar.ph60.prol.loopexit:                        ; preds = %scalar.ph60.prol, %scalar.ph60.preheader
  %indvars.iv39.unr = phi i64 [ %indvars.iv39.ph, %scalar.ph60.preheader ], [ %indvars.iv.next40.prol, %scalar.ph60.prol ]
  %indvars.iv37.unr = phi i64 [ %indvars.iv37.ph, %scalar.ph60.preheader ], [ %indvars.iv.next38.prol, %scalar.ph60.prol ]
  %58 = icmp eq i64 %indvars.iv39.ph, %54
  br i1 %58, label %.loopexit, label %scalar.ph60.preheader.new

scalar.ph60.preheader.new:                        ; preds = %scalar.ph60.prol.loopexit
  %invariant.gep81 = getelementptr i8, ptr %40, i64 4
  br label %scalar.ph60

scalar.ph60:                                      ; preds = %scalar.ph60, %scalar.ph60.preheader.new
  %indvars.iv39 = phi i64 [ %indvars.iv39.unr, %scalar.ph60.preheader.new ], [ %indvars.iv.next40.1, %scalar.ph60 ]
  %indvars.iv37 = phi i64 [ %indvars.iv37.unr, %scalar.ph60.preheader.new ], [ %indvars.iv.next38.1, %scalar.ph60 ]
  %59 = getelementptr inbounds i32, ptr %33, i64 %indvars.iv37
  %60 = load i32, ptr %59, align 4, !tbaa !13
  %61 = getelementptr inbounds i32, ptr %40, i64 %indvars.iv39
  store i32 %60, ptr %61, align 4, !tbaa !13
  %indvars.iv.next38 = add nsw i64 %indvars.iv37, -1
  store i32 0, ptr %59, align 4, !tbaa !13
  %62 = getelementptr inbounds i32, ptr %33, i64 %indvars.iv.next38
  %63 = load i32, ptr %62, align 4, !tbaa !13
  %indvars.iv.next40.1 = add nuw nsw i64 %indvars.iv39, 2
  %gep82 = getelementptr i32, ptr %invariant.gep81, i64 %indvars.iv39
  store i32 %63, ptr %gep82, align 4, !tbaa !13
  %indvars.iv.next38.1 = add nsw i64 %indvars.iv37, -2
  store i32 0, ptr %62, align 4, !tbaa !13
  %exitcond45.not.1 = icmp eq i64 %indvars.iv.next40.1, %wide.trip.count44
  br i1 %exitcond45.not.1, label %.loopexit, label %scalar.ph60, !llvm.loop !30

.loopexit:                                        ; preds = %scalar.ph60.prol.loopexit, %scalar.ph60, %middle.block59, %._crit_edge, %1
  %.025 = phi i32 [ -1, %1 ], [ %36, %._crit_edge ], [ %36, %middle.block59 ], [ %36, %scalar.ph60 ], [ %36, %scalar.ph60.prol.loopexit ]
  ret i32 %.025
}

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @myQueueEmpty(ptr noundef) local_unnamed_addr #0

attributes #0 = { 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" }

!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, !10, i64 16}
!6 = !{!"", !7, i64 0, !7, i64 8, !10, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !7, i64 8}
!12 = !{!6, !7, i64 0}
!13 = !{!10, !10, i64 0}
!14 = !{!15}
!15 = distinct !{!15, !16}
!16 = distinct !{!16, !"LVerDomain"}
!17 = !{!18}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !20, !21, !22}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!"llvm.loop.isvectorized", i32 1}
!22 = !{!"llvm.loop.unroll.runtime.disable"}
!23 = distinct !{!23, !20, !21}
!24 = !{!25}
!25 = distinct !{!25, !26}
!26 = distinct !{!26, !"LVerDomain"}
!27 = !{!28}
!28 = distinct !{!28, !26}
!29 = distinct !{!29, !20, !21, !22}
!30 = distinct !{!30, !20, !21}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,TailCallElimPass