	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_page_grab                   ## -- Begin function vm_page_grab
	.p2align	4, 0x90
_vm_page_grab:                          ## @vm_page_grab
	.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
	movl	%edx, %r12d
	movl	%esi, %r14d
	movl	%edi, %r15d
	callq	_VM_OBJECT_ASSERT_WLOCKED
	movq	_VM_ALLOC_SBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r12d, %eax
	sete	%al
	movq	_VM_ALLOC_IGN_SBUSY@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	andl	%r12d, %ecx
	setne	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	_VM_ALLOC_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_VM_ALLOC_WAITOK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%eax, %ecx
	movq	_VM_ALLOC_WAITFAIL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%edx, %ecx
	movq	_VM_ALLOC_NOBUSY@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
	notl	%ecx
	andl	%r12d, %ecx
	xorl	%r13d, %r13d
	testl	%r12d, %eax
	cmovel	%edx, %r13d
	orl	%ecx, %r13d
	movl	(%rbx), %eax
	andl	%r12d, %eax
	je	LBB0_2
## %bb.1:
	movq	_VM_ALLOC_SBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_2:
	orl	%eax, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	xorl	%edx, %edx
	movq	_VM_ALLOC_IGN_SBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r12d, %eax
	setne	%dl
	movq	%rbx, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_vm_page_busy_sleep
	movl	%r15d, %edi
	callq	_VM_OBJECT_WLOCK
	movq	_VM_ALLOC_WAITFAIL@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	jne	LBB0_16
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_vm_page_lookup
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rbx
	movq	_VM_ALLOC_SBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_VM_ALLOC_IGN_SBUSY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%rbx, %rdi
	testl	%r12d, %eax
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	callq	_vm_page_trysbusy
	testl	%eax, %eax
	je	LBB0_11
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_VM_ALLOC_NOCREAT@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	jne	LBB0_16
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%r15d, %edi
	movl	%r14d, %esi
	movl	%r13d, %edx
	callq	_vm_page_alloc
	testq	%rax, %rax
	jne	LBB0_19
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_VM_ALLOC_NOWAIT@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_4
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	callq	_vm_page_tryxbusy
	testl	%eax, %eax
	jne	LBB0_14
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_VM_ALLOC_NOWAIT@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	jne	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_VM_ALLOC_NOCREAT@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	jne	LBB0_3
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_PGA_REFERENCED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_vm_page_aflag_set
	jmp	LBB0_3
LBB0_16:
	xorl	%ebx, %ebx
LBB0_27:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_VM_ALLOC_WIRED@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_22
## %bb.15:
	movq	%rbx, %rdi
	callq	_vm_page_wire
	jmp	LBB0_22
LBB0_19:
	movq	%rax, %rbx
	movq	_VM_ALLOC_ZERO@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_22
## %bb.20:
	movq	_PG_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_22
## %bb.21:
	movq	%rbx, %rdi
	callq	_pmap_zero_page
LBB0_22:
	movq	_VM_ALLOC_NOBUSY@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_27
## %bb.23:
	movq	_VM_ALLOC_IGN_SBUSY@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_26
## %bb.24:
	movq	%rbx, %rdi
	callq	_vm_page_sunbusy
	jmp	LBB0_27
LBB0_26:
	movq	%rbx, %rdi
	callq	_vm_page_xunbusy
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_VM_ALLOC_SBUSY,4,2             ## @VM_ALLOC_SBUSY
	.comm	_VM_ALLOC_IGN_SBUSY,4,2         ## @VM_ALLOC_IGN_SBUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vm_page_grab: VM_ALLOC_SBUSY/VM_ALLOC_IGN_SBUSY mismatch"

	.comm	_VM_ALLOC_NOWAIT,4,2            ## @VM_ALLOC_NOWAIT
	.comm	_VM_ALLOC_WAITOK,4,2            ## @VM_ALLOC_WAITOK
	.comm	_VM_ALLOC_WAITFAIL,4,2          ## @VM_ALLOC_WAITFAIL
	.comm	_VM_ALLOC_NOBUSY,4,2            ## @VM_ALLOC_NOBUSY
	.comm	_VM_ALLOC_NOCREAT,4,2           ## @VM_ALLOC_NOCREAT
	.comm	_PGA_REFERENCED,4,2             ## @PGA_REFERENCED
L_.str.1:                               ## @.str.1
	.asciz	"pgrbwt"

	.comm	_VM_ALLOC_WIRED,4,2             ## @VM_ALLOC_WIRED
	.comm	_VM_ALLOC_ZERO,4,2              ## @VM_ALLOC_ZERO
	.comm	_PG_ZERO,4,2                    ## @PG_ZERO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_page_grab                   ; -- Begin function vm_page_grab
	.p2align	2
_vm_page_grab:                          ; @vm_page_grab
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_VM_OBJECT_ASSERT_WLOCKED
Lloh0:
	adrp	x27, _VM_ALLOC_SBUSY@GOTPAGE
Lloh1:
	ldr	x27, [x27, _VM_ALLOC_SBUSY@GOTPAGEOFF]
	ldr	w8, [x27]
	tst	w8, w19
	cset	w8, eq
Lloh2:
	adrp	x25, _VM_ALLOC_IGN_SBUSY@GOTPAGE
Lloh3:
	ldr	x25, [x25, _VM_ALLOC_IGN_SBUSY@GOTPAGEOFF]
	ldr	w9, [x25]
	tst	w9, w19
	cset	w9, ne
	orr	w0, w8, w9
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
Lloh6:
	adrp	x28, _VM_ALLOC_NOWAIT@GOTPAGE
Lloh7:
	ldr	x28, [x28, _VM_ALLOC_NOWAIT@GOTPAGEOFF]
	ldr	w8, [x28]
Lloh8:
	adrp	x9, _VM_ALLOC_WAITOK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _VM_ALLOC_WAITOK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w9, w9, w8
Lloh11:
	adrp	x10, _VM_ALLOC_WAITFAIL@GOTPAGE
Lloh12:
	ldr	x10, [x10, _VM_ALLOC_WAITFAIL@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
Lloh14:
	adrp	x11, _VM_ALLOC_NOBUSY@GOTPAGE
Lloh15:
	ldr	x11, [x11, _VM_ALLOC_NOBUSY@GOTPAGEOFF]
	orr	w9, w9, w10
Lloh16:
	ldr	w11, [x11]
	orr	w9, w9, w11
	bic	w9, w19, w9
	tst	w8, w19
	csel	w8, w10, wzr, eq
	orr	w8, w9, w8
	ldr	w9, [x25]
	ldr	w10, [x27]
	tst	w9, w19
	csel	w9, wzr, w10, eq
	orr	w23, w8, w9
Lloh17:
	adrp	x26, _VM_ALLOC_NOCREAT@GOTPAGE
Lloh18:
	ldr	x26, [x26, _VM_ALLOC_NOCREAT@GOTPAGEOFF]
Lloh19:
	adrp	x24, l_.str.1@PAGE
Lloh20:
	add	x24, x24, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x25]
	tst	w8, w19
	cset	w2, ne
	mov	x0, x22
	mov	x1, x24
	bl	_vm_page_busy_sleep
	mov	x0, x21
	bl	_VM_OBJECT_WLOCK
Lloh21:
	adrp	x8, _VM_ALLOC_WAITFAIL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _VM_ALLOC_WAITFAIL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	tst	w8, w19
	b.ne	LBB0_12
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x20
	bl	_vm_page_lookup
	cbz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x22, x0
	ldr	w8, [x25]
	ldr	w9, [x27]
	orr	w8, w9, w8
	tst	w8, w19
	b.eq	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_vm_page_trysbusy
	cbz	w0, LBB0_9
	b	LBB0_14
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x26]
	tst	w8, w19
	b.ne	LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x23
	bl	_vm_page_alloc
	cbnz	x0, LBB0_16
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x28]
	tst	w8, w19
	b.eq	LBB0_2
	b	LBB0_12
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	bl	_vm_page_tryxbusy
	cbnz	w0, LBB0_14
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x28]
	tst	w8, w19
	b.ne	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x26]
	tst	w8, w19
	b.ne	LBB0_1
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
Lloh24:
	adrp	x8, _PGA_REFERENCED@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PGA_REFERENCED@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_vm_page_aflag_set
	b	LBB0_1
LBB0_12:
	mov	x22, #0
LBB0_13:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_14:
Lloh27:
	adrp	x8, _VM_ALLOC_WIRED@GOTPAGE
Lloh28:
	ldr	x8, [x8, _VM_ALLOC_WIRED@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_19
; %bb.15:
	mov	x0, x22
	bl	_vm_page_wire
	b	LBB0_19
LBB0_16:
	mov	x22, x0
Lloh30:
	adrp	x8, _VM_ALLOC_ZERO@GOTPAGE
Lloh31:
	ldr	x8, [x8, _VM_ALLOC_ZERO@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_19
; %bb.17:
	ldr	w8, [x22]
Lloh33:
	adrp	x9, _PG_ZERO@GOTPAGE
Lloh34:
	ldr	x9, [x9, _PG_ZERO@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_19
; %bb.18:
	mov	x0, x22
	bl	_pmap_zero_page
LBB0_19:
Lloh36:
	adrp	x8, _VM_ALLOC_NOBUSY@GOTPAGE
Lloh37:
	ldr	x8, [x8, _VM_ALLOC_NOBUSY@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_13
; %bb.20:
	ldr	w8, [x25]
	mov	x0, x22
	tst	w8, w19
	b.eq	LBB0_22
; %bb.21:
	bl	_vm_page_sunbusy
	b	LBB0_13
LBB0_22:
	bl	_vm_page_xunbusy
	b	LBB0_13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_VM_ALLOC_SBUSY,4,2             ; @VM_ALLOC_SBUSY
	.comm	_VM_ALLOC_IGN_SBUSY,4,2         ; @VM_ALLOC_IGN_SBUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vm_page_grab: VM_ALLOC_SBUSY/VM_ALLOC_IGN_SBUSY mismatch"

	.comm	_VM_ALLOC_NOWAIT,4,2            ; @VM_ALLOC_NOWAIT
	.comm	_VM_ALLOC_WAITOK,4,2            ; @VM_ALLOC_WAITOK
	.comm	_VM_ALLOC_WAITFAIL,4,2          ; @VM_ALLOC_WAITFAIL
	.comm	_VM_ALLOC_NOBUSY,4,2            ; @VM_ALLOC_NOBUSY
	.comm	_VM_ALLOC_NOCREAT,4,2           ; @VM_ALLOC_NOCREAT
	.comm	_PGA_REFERENCED,4,2             ; @PGA_REFERENCED
l_.str.1:                               ; @.str.1
	.asciz	"pgrbwt"

	.comm	_VM_ALLOC_WIRED,4,2             ; @VM_ALLOC_WIRED
	.comm	_VM_ALLOC_ZERO,4,2              ; @VM_ALLOC_ZERO
	.comm	_PG_ZERO,4,2                    ; @PG_ZERO
.subsections_via_symbols
