	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_wait_domain                 ## -- Begin function vm_wait_domain
	.p2align	4, 0x90
_vm_wait_domain:                        ## @vm_wait_domain
	.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
	callq	_VM_DOMAIN
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_vm_domain_free_assert_unlocked
	movq	_curproc@GOTPCREL(%rip), %rcx
	movq	_pageproc@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, (%rcx)
	je	LBB0_1
## %bb.3:
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	callq	_panic
LBB0_5:
	leaq	-20(%rbp), %r14
	movq	%r14, %rdi
	callq	_DOMAINSET_ZERO
	movl	20(%rbx), %edi
	movq	%r14, %rsi
	callq	_DOMAINSET_SET
	movq	%r14, %rdi
	callq	_vm_wait_doms
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	_vm_domainset_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_lock
	movq	(%rbx), %rax
	cmpq	8(%rbx), %rax
	jge	LBB0_2
## %bb.6:
	movq	%rbx, %rdi
	movl	$1, 16(%rbx)
	movq	_PDROP@GOTPCREL(%rip), %rax
	movq	_PSWP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	addq	$16, %rdi
	movq	_vm_domainset_lock@GOTPCREL(%rip), %rsi
	leaq	L_.str(%rip), %rcx
	xorl	%r8d, %r8d
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_msleep                         ## TAILCALL
LBB0_2:
	movq	_vm_domainset_lock@GOTPCREL(%rip), %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mtx_unlock                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_curproc,8,3                    ## @curproc
	.comm	_pageproc,8,3                   ## @pageproc
	.comm	_vm_domainset_lock,4,2          ## @vm_domainset_lock
	.comm	_PDROP,4,2                      ## @PDROP
	.comm	_PSWP,4,2                       ## @PSWP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VMWait"

L_.str.1:                               ## @.str.1
	.asciz	"vm_wait in early boot"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_wait_domain                 ; -- Begin function vm_wait_domain
	.p2align	2
_vm_wait_domain:                        ; @vm_wait_domain
	.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
	bl	_VM_DOMAIN
	mov	x19, x0
	bl	_vm_domain_free_assert_unlocked
Lloh0:
	adrp	x8, _curproc@GOTPAGE
Lloh1:
	ldr	x8, [x8, _curproc@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
Lloh3:
	adrp	x8, _pageproc@GOTPAGE
Lloh4:
	ldr	x8, [x8, _pageproc@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x9, x8
	b.eq	LBB0_4
; %bb.1:
	cbnz	x8, LBB0_3
; %bb.2:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_panic
LBB0_3:
	add	x0, sp, #12
	bl	_DOMAINSET_ZERO
	ldr	w0, [x19, #20]
	add	x1, sp, #12
	bl	_DOMAINSET_SET
	add	x0, sp, #12
	bl	_vm_wait_doms
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
Lloh8:
	adrp	x0, _vm_domainset_lock@GOTPAGE
Lloh9:
	ldr	x0, [x0, _vm_domainset_lock@GOTPAGEOFF]
	bl	_mtx_lock
	ldp	x8, x9, [x19]
	cmp	x8, x9
	b.ge	LBB0_6
; %bb.5:
	mov	w8, #1
	str	w8, [x19, #16]!
Lloh10:
	adrp	x8, _PDROP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PDROP@GOTPAGEOFF]
Lloh12:
	adrp	x9, _PSWP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PSWP@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x1, _vm_domainset_lock@GOTPAGE
Lloh17:
	ldr	x1, [x1, _vm_domainset_lock@GOTPAGEOFF]
Lloh18:
	adrp	x3, l_.str@PAGE
Lloh19:
	add	x3, x3, l_.str@PAGEOFF
	orr	w2, w9, w8
	mov	x0, x19
	mov	w4, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_msleep
LBB0_6:
Lloh20:
	adrp	x0, _vm_domainset_lock@GOTPAGE
Lloh21:
	ldr	x0, [x0, _vm_domainset_lock@GOTPAGEOFF]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_mtx_unlock
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_curproc,8,3                    ; @curproc
	.comm	_pageproc,8,3                   ; @pageproc
	.comm	_vm_domainset_lock,4,2          ; @vm_domainset_lock
	.comm	_PDROP,4,2                      ; @PDROP
	.comm	_PSWP,4,2                       ; @PSWP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VMWait"

l_.str.1:                               ; @.str.1
	.asciz	"vm_wait in early boot"

.subsections_via_symbols
