	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vm_fault_dirty
_vm_fault_dirty:                        ## @vm_fault_dirty
	.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	%r9d, %r15d
	movl	%r8d, %r12d
	movl	%ecx, %r13d
	movq	%rsi, %rbx
	movq	_VM_PROT_WRITE@GOTPCREL(%rip), %r14
	testl	%edx, (%r14)
	jne	LBB0_2
## %bb.1:
	movq	_VM_FAULT_DIRTY@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_17
LBB0_2:
	movq	_VPO_UNMANAGED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_3
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	16(%rbx), %edi
	callq	_VM_OBJECT_ASSERT_LOCKED
	movq	%rbx, %rdi
	callq	_VM_PAGE_OBJECT_BUSY_ASSERT
	testl	%r13d, (%r14)
	je	LBB0_6
## %bb.4:
	movq	_VM_FAULT_WIRE@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_5
LBB0_6:
	movq	_VM_FAULT_DIRTY@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	setne	%r12b
	jmp	LBB0_7
LBB0_5:
	movb	$1, %r12b
LBB0_7:
	movl	16(%rbx), %edi
	callq	_vm_object_set_writeable_dirty
	testl	%r15d, %r15d
	jne	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_vm_page_lock
LBB0_9:
	movq	_MAP_ENTRY_NOSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.10:
	cmpq	$0, 8(%rbx)
	jne	LBB0_13
## %bb.11:
	movq	_PGA_NOSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_vm_page_aflag_set
LBB0_13:
	testb	%r12b, %r12b
	je	LBB0_16
LBB0_14:
	movq	%rbx, %rdi
	callq	_vm_page_dirty
	testl	%r15d, %r15d
	je	LBB0_18
## %bb.15:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vm_pager_page_unswapped        ## TAILCALL
LBB0_12:
	movq	_PGA_NOSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_vm_page_aflag_clear
	testb	%r12b, %r12b
	jne	LBB0_14
LBB0_16:
	testl	%r15d, %r15d
	jne	LBB0_17
LBB0_18:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vm_page_unlock                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VM_PROT_WRITE,4,2              ## @VM_PROT_WRITE
	.comm	_VM_FAULT_DIRTY,4,2             ## @VM_FAULT_DIRTY
	.comm	_VPO_UNMANAGED,4,2              ## @VPO_UNMANAGED
	.comm	_VM_FAULT_WIRE,4,2              ## @VM_FAULT_WIRE
	.comm	_MAP_ENTRY_NOSYNC,4,2           ## @MAP_ENTRY_NOSYNC
	.comm	_PGA_NOSYNC,4,2                 ## @PGA_NOSYNC
	.no_dead_strip	_vm_fault_dirty
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vm_fault_dirty
_vm_fault_dirty:                        ; @vm_fault_dirty
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x5
	mov	x22, x4
	mov	x23, x3
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x24, _VM_PROT_WRITE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _VM_PROT_WRITE@GOTPAGEOFF]
	ldr	w8, [x24]
	tst	w8, w2
	b.ne	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _VM_FAULT_DIRTY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VM_FAULT_DIRTY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_3
LBB0_2:
	ldr	w8, [x19]
Lloh5:
	adrp	x9, _VPO_UNMANAGED@GOTPAGE
Lloh6:
	ldr	x9, [x9, _VPO_UNMANAGED@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w0, [x19, #16]
	bl	_VM_OBJECT_ASSERT_LOCKED
	mov	x0, x19
	bl	_VM_PAGE_OBJECT_BUSY_ASSERT
	ldr	w8, [x24]
	tst	w8, w23
	b.eq	LBB0_6
; %bb.5:
Lloh8:
	adrp	x8, _VM_FAULT_WIRE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VM_FAULT_WIRE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _VM_FAULT_DIRTY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VM_FAULT_DIRTY@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w22
	cset	w22, ne
	b	LBB0_8
LBB0_7:
	mov	w22, #1
LBB0_8:
	ldr	w0, [x19, #16]
	bl	_vm_object_set_writeable_dirty
	cbnz	w20, LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_vm_page_lock
LBB0_10:
	ldr	w8, [x21]
Lloh14:
	adrp	x9, _MAP_ENTRY_NOSYNC@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MAP_ENTRY_NOSYNC@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.11:
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_13
; %bb.12:
Lloh17:
	adrp	x8, _PGA_NOSYNC@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PGA_NOSYNC@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_vm_page_aflag_set
LBB0_13:
	cbz	w22, LBB0_17
LBB0_14:
	mov	x0, x19
	bl	_vm_page_dirty
	cbz	w20, LBB0_18
; %bb.15:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_vm_pager_page_unswapped
LBB0_16:
Lloh20:
	adrp	x8, _PGA_NOSYNC@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PGA_NOSYNC@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_vm_page_aflag_clear
	cbnz	w22, LBB0_14
LBB0_17:
	cbnz	w20, LBB0_3
LBB0_18:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_vm_page_unlock
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_VM_PROT_WRITE,4,2              ; @VM_PROT_WRITE
	.comm	_VM_FAULT_DIRTY,4,2             ; @VM_FAULT_DIRTY
	.comm	_VPO_UNMANAGED,4,2              ; @VPO_UNMANAGED
	.comm	_VM_FAULT_WIRE,4,2              ; @VM_FAULT_WIRE
	.comm	_MAP_ENTRY_NOSYNC,4,2           ; @MAP_ENTRY_NOSYNC
	.comm	_PGA_NOSYNC,4,2                 ; @PGA_NOSYNC
	.no_dead_strip	_vm_fault_dirty
.subsections_via_symbols
