	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_emulate_accessed_dirty    ## -- Begin function pmap_emulate_accessed_dirty
	.p2align	4, 0x90
_pmap_emulate_accessed_dirty:           ## @pmap_emulate_accessed_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r12d
	movl	%edi, %ebx
	movq	_VM_PROT_READ@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	sete	%al
	movq	_VM_PROT_WRITE@GOTPCREL(%rip), %rcx
	cmpl	%edx, (%rcx)
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	movslq	%edx, %rsi
	callq	_KASSERT
	movl	%ebx, %edi
	callq	_pmap_emulate_ad_bits
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%ebx, %edi
	callq	_pmap_accessed_bit
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_pmap_modified_bit
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_pmap_valid_bit
	movl	%eax, %r15d
	movl	%ebx, %edi
	callq	_pmap_rw_bit
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_PMAP_LOCK
	movl	%ebx, %edi
	movl	%r12d, %esi
	callq	_pmap_pde
	movl	$-1, %r13d
	testq	%rax, %rax
	je	LBB0_13
## %bb.3:
	movl	(%rax), %ecx
	testl	%r15d, %ecx
	je	LBB0_13
## %bb.4:
	movq	_PG_PS@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_7
## %bb.5:
	movq	_VM_PROT_READ@GOTPCREL(%rip), %rdx
	cmpl	%r14d, (%rdx)
	jne	LBB0_13
## %bb.6:
	orl	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	movl	%ecx, (%rax)
	jmp	LBB0_12
LBB0_1:
	movl	$-1, %r13d
	jmp	LBB0_14
LBB0_7:
	movq	%rax, %rdi
	movl	%r12d, %esi
	callq	_pmap_pde_to_pte
	movl	(%rax), %ecx
	testl	%r15d, %ecx
	je	LBB0_13
## %bb.8:
	movq	_VM_PROT_WRITE@GOTPCREL(%rip), %rdx
	cmpl	%r14d, (%rdx)
	jne	LBB0_11
## %bb.9:
	testl	%ecx, -52(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_13
## %bb.10:
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	orl	%edx, -44(%rbp)                 ## 4-byte Folded Spill
LBB0_11:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	orl	%ecx, %edx
	movl	%edx, (%rax)
LBB0_12:
	xorl	%r13d, %r13d
LBB0_13:
	movl	%ebx, %edi
	callq	_PMAP_UNLOCK
LBB0_14:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VM_PROT_READ,4,2               ## @VM_PROT_READ
	.comm	_VM_PROT_WRITE,4,2              ## @VM_PROT_WRITE
	.comm	_PG_PS,4,2                      ## @PG_PS
	.comm	_NPTEPG,8,3                     ## @NPTEPG
	.comm	_PG_FICTITIOUS,4,2              ## @PG_FICTITIOUS
	.comm	_PG_FRAME,4,2                   ## @PG_FRAME
	.comm	_VM_MAXUSER_ADDRESS,4,2         ## @VM_MAXUSER_ADDRESS
	.comm	_ad_emulation_superpage_promotions,4,2 ## @ad_emulation_superpage_promotions
	.comm	_num_accessed_emulations,4,2    ## @num_accessed_emulations
	.comm	_num_dirty_emulations,4,2       ## @num_dirty_emulations
	.comm	_num_superpage_accessed_emulations,4,2 ## @num_superpage_accessed_emulations
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_emulate_accessed_dirty    ; -- Begin function pmap_emulate_accessed_dirty
	.p2align	2
_pmap_emulate_accessed_dirty:           ; @pmap_emulate_accessed_dirty
	.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	x20, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x27, _VM_PROT_READ@GOTPAGE
Lloh1:
	ldr	x27, [x27, _VM_PROT_READ@GOTPAGEOFF]
	ldr	w8, [x27]
	cmp	w8, w2
Lloh2:
	adrp	x26, _VM_PROT_WRITE@GOTPAGE
Lloh3:
	ldr	x26, [x26, _VM_PROT_WRITE@GOTPAGEOFF]
	ldr	w8, [x26]
	ccmp	w8, w2, #4, ne
	cset	w0, eq
	sxtw	x1, w20
	bl	_KASSERT
	mov	x0, x19
	bl	_pmap_emulate_ad_bits
	cbz	w0, LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_pmap_accessed_bit
	mov	x21, x0
	mov	x0, x19
	bl	_pmap_modified_bit
	mov	x23, x0
	mov	x0, x19
	bl	_pmap_valid_bit
	mov	x25, x0
	mov	x0, x19
	bl	_pmap_rw_bit
	mov	x24, x0
	mov	x0, x19
	bl	_PMAP_LOCK
	mov	x0, x19
	mov	x1, x22
	bl	_pmap_pde
	cbz	x0, LBB0_13
; %bb.2:
	ldr	w8, [x0]
	tst	w8, w25
	b.eq	LBB0_13
; %bb.3:
Lloh4:
	adrp	x9, _PG_PS@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PG_PS@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.4:
	ldr	w9, [x27]
	cmp	w9, w20
	b.ne	LBB0_13
; %bb.5:
	mov	w20, #0
	orr	w8, w8, w21
	b	LBB0_12
LBB0_6:
	mov	w20, #-1
	b	LBB0_15
LBB0_7:
	mov	x1, x22
	bl	_pmap_pde_to_pte
	ldr	w8, [x0]
	tst	w8, w25
	b.eq	LBB0_13
; %bb.8:
	ldr	w9, [x26]
	cmp	w9, w20
	b.ne	LBB0_11
; %bb.9:
	tst	w8, w24
	b.eq	LBB0_13
; %bb.10:
	orr	w21, w23, w21
LBB0_11:
	mov	w20, #0
	orr	w8, w21, w8
LBB0_12:
	str	w8, [x0]
	b	LBB0_14
LBB0_13:
	mov	w20, #-1
LBB0_14:
	mov	x0, x19
	bl	_PMAP_UNLOCK
LBB0_15:
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_VM_PROT_READ,4,2               ; @VM_PROT_READ
	.comm	_VM_PROT_WRITE,4,2              ; @VM_PROT_WRITE
	.comm	_PG_PS,4,2                      ; @PG_PS
	.comm	_NPTEPG,8,3                     ; @NPTEPG
	.comm	_PG_FICTITIOUS,4,2              ; @PG_FICTITIOUS
	.comm	_PG_FRAME,4,2                   ; @PG_FRAME
	.comm	_VM_MAXUSER_ADDRESS,4,2         ; @VM_MAXUSER_ADDRESS
	.comm	_ad_emulation_superpage_promotions,4,2 ; @ad_emulation_superpage_promotions
	.comm	_num_accessed_emulations,4,2    ; @num_accessed_emulations
	.comm	_num_dirty_emulations,4,2       ; @num_dirty_emulations
	.comm	_num_superpage_accessed_emulations,4,2 ; @num_superpage_accessed_emulations
.subsections_via_symbols
