	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function queue_demotion
_queue_demotion:                        ## @queue_demotion
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	xorl	%edi, %edi
	cmpl	$0, 8(%rbx)
	sete	%dil
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	je	LBB0_1
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movl	(%rbx), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_q_peek
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	%rax, %r14
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_mark_pending
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_q_del
	movq	_POLICY_DEMOTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movl	(%r14), %eax
	movl	%eax, -28(%rbp)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_infer_cblock
	movl	%eax, -32(%rbp)
	movl	4(%rbx), %edi
	leaq	-32(%rbp), %rsi
	xorl	%edx, %edx
	callq	_btracker_queue
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_clear_pending
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_q_push_front
	jmp	LBB0_6
LBB0_2:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_clean_target_met
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_queue_writeback                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_POLICY_DEMOTE,4,2              ## @POLICY_DEMOTE
	.no_dead_strip	_queue_demotion
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function queue_demotion
_queue_demotion:                        ; @queue_demotion
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0, #8]
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON_ONCE
	cbz	x0, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_2:
	ldr	w8, [x19]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w1, w8, #1
	mov	x0, x19
	mov	w2, #1
	bl	_q_peek
	cbz	x0, LBB0_5
; %bb.3:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_mark_pending
	mov	x0, x19
	mov	x1, x20
	bl	_q_del
Lloh0:
	adrp	x8, _POLICY_DEMOTE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _POLICY_DEMOTE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x20]
	stp	w9, w8, [sp, #4]
	mov	x0, x19
	mov	x1, x20
	bl	_infer_cblock
	str	w0, [sp]
	ldr	w0, [x19, #4]
	mov	x1, sp
	mov	x2, #0
	bl	_btracker_queue
	cbz	w0, LBB0_1
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	bl	_clear_pending
	mov	x0, x19
	mov	x1, x20
	bl	_q_push_front
	b	LBB0_1
LBB0_5:
	mov	x0, x19
	mov	w1, #1
	bl	_clean_target_met
	cbnz	w0, LBB0_1
; %bb.6:
	mov	x0, x19
	mov	w1, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_queue_writeback
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_POLICY_DEMOTE,4,2              ; @POLICY_DEMOTE
	.no_dead_strip	_queue_demotion
.subsections_via_symbols
