	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_page_swapqueue              ## -- Begin function vm_page_swapqueue
	.p2align	4, 0x90
_vm_page_swapqueue:                     ## @vm_page_swapqueue
	.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	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_PQ_COUNT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rsi, %rax
	seta	%cl
	cmpq	%rdx, %rax
	seta	%al
	andb	%cl, %al
	cmpq	%rdx, %rsi
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	movq	%rdx, %rsi
	callq	_KASSERT
	movq	%r14, %rdi
	callq	_vm_page_assert_locked
	movq	%r14, %rdi
	callq	_vm_pagequeue_domain
	leaq	(,%rbx,4), %r12
	addq	(%rax), %r12
	movq	%r12, %rdi
	callq	_vm_pagequeue_lock
	xorl	%edi, %edi
	cmpq	%rbx, (%r14)
	setne	%dil
	callq	___predict_false
	testq	%rax, %rax
	je	LBB0_1
LBB0_9:
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vm_pagequeue_unlock            ## TAILCALL
LBB0_1:
	movq	_PGA_ENQUEUED@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	xorl	%edi, %edi
	andl	8(%r14), %eax
	setne	%dil
	callq	___predict_true
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	_plinks@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_TAILQ_NEXT
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_plinks@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_TAILQ_REMOVE
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_vm_page_aflag_clear
	jmp	LBB0_4
LBB0_2:
                                        ## implicit-def: $rax
                                        ## kill: killed $rax
LBB0_4:
	movq	_PGA_DEQUEUE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_PGA_REQUEUE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_vm_page_pqstate_cmpset
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	___predict_false
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_9
## %bb.6:
	movq	_PGA_ENQUEUED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_vm_page_aflag_set
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	_plinks@GOTPCREL(%rip), %rax
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	movl	(%rax), %edx
	movq	%r14, %rsi
	callq	_TAILQ_INSERT_BEFORE
	jmp	LBB0_9
LBB0_10:
	movq	%r12, %rdi
	callq	_vm_pagequeue_cnt_dec
	movq	%r12, %rdi
	callq	_vm_pagequeue_unlock
	movq	%r14, %rdi
	movq	%r15, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vm_page_pqbatch_submit         ## TAILCALL
LBB0_8:
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_TAILQ_INSERT_TAIL
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_PQ_COUNT,8,3                   ## @PQ_COUNT
	.comm	_PGA_ENQUEUED,4,2               ## @PGA_ENQUEUED
	.comm	_plinks,4,2                     ## @plinks
	.comm	_PGA_DEQUEUE,4,2                ## @PGA_DEQUEUE
	.comm	_PGA_REQUEUE,4,2                ## @PGA_REQUEUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_page_swapqueue              ; -- Begin function vm_page_swapqueue
	.p2align	2
_vm_page_swapqueue:                     ; @vm_page_swapqueue
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _PQ_COUNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PQ_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	ccmp	x8, x2, #0, hi
	ccmp	x1, x2, #4, hi
	cset	w0, ne
	mov	x1, x2
	bl	_KASSERT
	mov	x0, x19
	bl	_vm_page_assert_locked
	mov	x0, x19
	bl	_vm_pagequeue_domain
	ldr	x8, [x0]
	add	x20, x8, x22, lsl #2
	mov	x0, x20
	bl	_vm_pagequeue_lock
	ldr	x8, [x19]
	cmp	x8, x22
	cset	w0, ne
	bl	___predict_false
	cbz	x0, LBB0_2
LBB0_1:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_vm_pagequeue_unlock
LBB0_2:
	ldr	w8, [x19, #8]
Lloh3:
	adrp	x25, _PGA_ENQUEUED@GOTPAGE
Lloh4:
	ldr	x25, [x25, _PGA_ENQUEUED@GOTPAGEOFF]
	ldr	w9, [x25]
	tst	w9, w8
	cset	w0, ne
	bl	___predict_true
	mov	x24, x0
	cbz	x0, LBB0_4
; %bb.3:
Lloh5:
	adrp	x26, _plinks@GOTPAGE
Lloh6:
	ldr	x26, [x26, _plinks@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x19
	bl	_TAILQ_NEXT
	mov	x23, x0
	ldr	w2, [x26]
	mov	x0, x20
	mov	x1, x19
	bl	_TAILQ_REMOVE
	ldr	w1, [x25]
	mov	x0, x19
	bl	_vm_page_aflag_clear
	b	LBB0_5
LBB0_4:
                                        ; implicit-def: $x23
LBB0_5:
Lloh7:
	adrp	x8, _PGA_DEQUEUE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PGA_DEQUEUE@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
Lloh10:
	adrp	x8, _PGA_REQUEUE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PGA_REQUEUE@GOTPAGEOFF]
Lloh12:
	ldr	w4, [x8]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_vm_page_pqstate_cmpset
	cmp	w0, #0
	cset	w0, eq
	bl	___predict_false
	cbz	x0, LBB0_9
; %bb.6:
	cbz	x24, LBB0_1
; %bb.7:
	ldr	w1, [x25]
	mov	x0, x19
	bl	_vm_page_aflag_set
Lloh13:
	adrp	x8, _plinks@GOTPAGE
Lloh14:
	ldr	x8, [x8, _plinks@GOTPAGEOFF]
	cbz	x23, LBB0_10
; %bb.8:
	ldr	w2, [x8]
	mov	x0, x23
	mov	x1, x19
	bl	_TAILQ_INSERT_BEFORE
	b	LBB0_1
LBB0_9:
	mov	x0, x20
	bl	_vm_pagequeue_cnt_dec
	mov	x0, x20
	bl	_vm_pagequeue_unlock
	mov	x0, x19
	mov	x1, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_vm_page_pqbatch_submit
LBB0_10:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_TAILQ_INSERT_TAIL
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PQ_COUNT,8,3                   ; @PQ_COUNT
	.comm	_PGA_ENQUEUED,4,2               ; @PGA_ENQUEUED
	.comm	_plinks,4,2                     ; @plinks
	.comm	_PGA_DEQUEUE,4,2                ; @PGA_DEQUEUE
	.comm	_PGA_REQUEUE,4,2                ; @PGA_REQUEUE
.subsections_via_symbols
