	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_page_pqbatch_submit         ## -- Begin function vm_page_pqbatch_submit
	.p2align	4, 0x90
_vm_page_pqbatch_submit:                ## @vm_page_pqbatch_submit
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	_VPO_UNMANAGED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	(%r13), %eax
	sete	%dil
	movq	%r13, %rsi
	callq	_KASSERT
	movq	%r13, %rdi
	callq	_vm_page_lockptr
	movl	%eax, %edi
	callq	_mtx_owned
	movl	$1, %edi
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	cmpq	$0, 24(%r13)
	sete	%dil
LBB0_2:
	movq	%r13, %rsi
	callq	_KASSERT
	movq	_PQ_COUNT@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%r14, (%rax)
	seta	%dil
	movq	%r14, %rsi
	callq	_KASSERT
	movq	%r13, %rdi
	callq	_vm_phys_domain
	movl	%eax, %r12d
	movq	%r13, %rdi
	callq	_vm_pagequeue_domain
	leaq	(,%r14,4), %r15
	addq	(%rax), %r15
	xorl	%eax, %eax
	callq	_critical_enter
	movq	_pqbatch@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r12d, %r12
	movq	(%rax,%r12,8), %rax
	movl	(%rax,%r14,4), %edi
	callq	_DPCPU_PTR
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_vm_batchqueue_insert
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_critical_exit
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r15, %rdi
	callq	_vm_pagequeue_lock
	xorl	%eax, %eax
	callq	_critical_enter
	movq	_pqbatch@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r12,8), %rax
	movl	(%rax,%r14,4), %edi
	callq	_DPCPU_PTR
	movq	%r15, %rdi
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_vm_pqbatch_process
	xorl	%edi, %edi
	cmpq	%r14, 8(%r13)
	sete	%dil
	callq	___predict_true
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_vm_pqbatch_process_page
	jmp	LBB0_6
LBB0_5:
	movq	8(%r13), %rax
	movq	_PQ_NONE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	movq	%r13, %rsi
	callq	_KASSERT
	movq	_PGA_ENQUEUED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	16(%r13), %eax
	sete	%dil
	movq	%r13, %rsi
	callq	_KASSERT
LBB0_6:
	movq	%r15, %rdi
	callq	_vm_pagequeue_unlock
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_critical_exit                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VPO_UNMANAGED,4,2              ## @VPO_UNMANAGED
	.comm	_PQ_COUNT,8,3                   ## @PQ_COUNT
	.comm	_pqbatch,8,3                    ## @pqbatch
	.comm	_PQ_NONE,8,3                    ## @PQ_NONE
	.comm	_PGA_ENQUEUED,4,2               ## @PGA_ENQUEUED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_page_pqbatch_submit         ; -- Begin function vm_page_pqbatch_submit
	.p2align	2
_vm_page_pqbatch_submit:                ; @vm_page_pqbatch_submit
	.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	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _VPO_UNMANAGED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VPO_UNMANAGED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	mov	x1, x19
	bl	_KASSERT
	mov	x0, x19
	bl	_vm_page_lockptr
	bl	_mtx_owned
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19, #24]
	cmp	x8, #0
	cset	w0, eq
LBB0_3:
	mov	x1, x19
	bl	_KASSERT
Lloh3:
	adrp	x8, _PQ_COUNT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PQ_COUNT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x20
	cset	w0, hi
	mov	x1, x20
	bl	_KASSERT
	mov	x0, x19
	bl	_vm_phys_domain
	mov	x22, x0
	mov	x0, x19
	bl	_vm_pagequeue_domain
	ldr	x24, [x0]
	lsl	x25, x20, #2
	bl	_critical_enter
Lloh6:
	adrp	x23, _pqbatch@GOTPAGE
Lloh7:
	ldr	x23, [x23, _pqbatch@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x8, [x8, w22, sxtw #3]
	ldr	w0, [x8, x25]
	bl	_DPCPU_PTR
	mov	x1, x19
	bl	_vm_batchqueue_insert
	mov	x21, x0
	bl	_critical_exit
	cbz	x21, LBB0_5
; %bb.4:
	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
	ret
LBB0_5:
	add	x21, x24, x25
	sxtw	x22, w22
	mov	x0, x21
	bl	_vm_pagequeue_lock
	bl	_critical_enter
	ldr	x8, [x23]
	ldr	x8, [x8, x22, lsl #3]
	ldr	w0, [x8, x20, lsl #2]
	bl	_DPCPU_PTR
	mov	x1, x0
	mov	x0, x21
	mov	x2, x20
	bl	_vm_pqbatch_process
	ldr	x8, [x19, #8]
	cmp	x8, x20
	cset	w0, eq
	bl	___predict_true
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x21
	mov	x1, x19
	bl	_vm_pqbatch_process_page
	b	LBB0_8
LBB0_7:
	ldr	x8, [x19, #8]
Lloh8:
	adrp	x9, _PQ_NONE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PQ_NONE@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	mov	x1, x19
	bl	_KASSERT
	ldr	w8, [x19, #16]
Lloh11:
	adrp	x9, _PGA_ENQUEUED@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PGA_ENQUEUED@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	mov	x1, x19
	bl	_KASSERT
LBB0_8:
	mov	x0, x21
	bl	_vm_pagequeue_unlock
	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	_critical_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_VPO_UNMANAGED,4,2              ; @VPO_UNMANAGED
	.comm	_PQ_COUNT,8,3                   ; @PQ_COUNT
	.comm	_pqbatch,8,3                    ; @pqbatch
	.comm	_PQ_NONE,8,3                    ; @PQ_NONE
	.comm	_PGA_ENQUEUED,4,2               ; @PGA_ENQUEUED
.subsections_via_symbols
