	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wf2qp_dequeue
_wf2qp_dequeue:                         ## @wf2qp_dequeue
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	addq	$4, %rdi
	leaq	36(%r14), %r12
	cmpq	$0, 44(%r14)
	jne	LBB0_4
## %bb.1:
	cmpq	$0, (%r12)
	je	LBB0_2
LBB0_4:
	leaq	44(%r14), %r15
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_idle_check
	leaq	20(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rdx
	callq	_heap_insert
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	cmpq	$0, (%r15)
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$0, (%r12)
	jle	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	12(%r14), %r13
	movq	%r12, %rdi
	callq	_HEAP_TOP
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_MAX64
	movq	%rax, 12(%r14)
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$0, (%r12)
	jle	LBB0_11
LBB0_9:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	callq	_HEAP_TOP
	movl	(%rax), %edi
	movq	12(%r14), %rsi
	callq	_DN_KEY_LEQ
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	%r12, %rdi
	callq	_HEAP_TOP
	movq	8(%rax), %rbx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_heap_extract
	movl	(%rbx), %esi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_heap_insert
	cmpq	$0, (%r12)
	jg	LBB0_9
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	jne	LBB0_3
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	callq	_HEAP_TOP
	movq	8(%rax), %r13
	movq	%r13, %rdi
	callq	_dn_dequeue
	movq	%rax, %rbx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_heap_extract
	movq	%rbx, %rax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movslq	(%rbx), %rax
	movslq	4(%r14), %rsi
	imulq	%rax, %rsi
	addq	12(%r14), %rsi
	movq	%rsi, 12(%r14)
	movl	(%r13), %eax
	movl	%eax, 4(%r13)
	movq	(%r13), %rcx
	testq	%rcx, %rcx
	je	LBB0_13
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	8(%r13), %edx
	imull	(%rcx), %edx
	addl	%eax, %edx
	movl	%edx, (%r13)
	movl	%eax, %edi
	callq	_DN_KEY_LEQ
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r13), %esi
	movq	%r15, %rdi
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	4(%r13), %esi
	movq	%r12, %rdi
	jmp	LBB0_14
LBB0_2:
	movl	$2147483647, %esi               ## imm = 0x7FFFFFFF
	movl	$1, %edx
	callq	_idle_check
	movq	$0, 12(%r14)
	movq	$0, 28(%r14)
	xorl	%eax, %eax
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_wf2qp_dequeue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wf2qp_dequeue
_wf2qp_dequeue:                         ; @wf2qp_dequeue
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	mov	x20, x0
	ldr	x8, [x20, #44]!
	sub	x0, x20, #40
	sub	x21, x20, #8
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x21]
	cbz	x8, LBB0_16
LBB0_2:
	mov	w1, #1
	mov	w2, #0
	bl	_idle_check
	mov	x23, #0
	add	x22, x19, #20
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	mov	x1, x8
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x2, x24
	bl	_heap_insert
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	x8, [x20]
	cbnz	x8, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x21]
	cmp	x8, #1
	b.lt	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldur	x24, [x19, #12]
	mov	x0, x21
	bl	_HEAP_TOP
	ldr	w1, [x0]
	mov	x0, x24
	bl	_MAX64
	stur	x0, [x19, #12]
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x21]
	cmp	x8, #1
	b.lt	LBB0_11
LBB0_9:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x21
	bl	_HEAP_TOP
	ldr	w0, [x0]
	ldur	x1, [x19, #12]
	bl	_DN_KEY_LEQ
	cbz	x0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	x0, x21
	bl	_HEAP_TOP
	ldr	x24, [x0, #8]
	mov	x0, x21
	mov	x1, #0
	bl	_heap_extract
	ldr	w1, [x24]
	mov	x0, x20
	mov	x2, x24
	bl	_heap_insert
	ldr	x8, [x21]
	cmp	x8, #0
	b.gt	LBB0_9
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	cbnz	x23, LBB0_17
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_HEAP_TOP
	ldr	x24, [x0, #8]
	mov	x0, x24
	bl	_dn_dequeue
	mov	x23, x0
	mov	x0, x20
	mov	x1, #0
	bl	_heap_extract
	ldrsw	x8, [x23]
	ldrsw	x9, [x19, #4]
	ldur	x10, [x19, #12]
	madd	x1, x9, x8, x10
	stur	x1, [x19, #12]
	ldr	w8, [x24]
	str	w8, [x24, #4]
	ldr	x9, [x24]
	cbz	x9, LBB0_3
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x9]
	ldr	w10, [x24, #8]
	madd	w9, w10, w9, w8
	str	w9, [x24]
	mov	x0, x8
	bl	_DN_KEY_LEQ
	cbz	x0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x24]
	mov	x0, x20
	b	LBB0_4
LBB0_15:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x24, #4]
	mov	x0, x21
	b	LBB0_4
LBB0_16:
	mov	w1, #2147483647
	mov	w2, #1
	bl	_idle_check
	mov	x23, #0
	stur	xzr, [x19, #12]
	stur	xzr, [x19, #28]
LBB0_17:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_wf2qp_dequeue
.subsections_via_symbols
