	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpt_host_page_access_control
_mpt_host_page_access_control:          ## @mpt_host_page_access_control
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	callq	_CHIPREG_READ32
	movl	%eax, %ecx
	movq	_MPI_DOORBELL_ACTIVE@GOTPCREL(%rip), %rdx
	movl	$-1, %eax
	testl	%ecx, (%rdx)
	jne	LBB0_2
## %bb.1:
	movq	(%rbx), %rdi
	addq	$4, %rdi
	xorl	%esi, %esi
	callq	_CHIPREG_WRITE32
	movq	_MPI_FUNCTION_HOST_PAGEBUF_ACCESS_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_MPI_DOORBELL_FUNCTION_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	(%rbx), %rdi
	shll	$12, %r15d
	orl	%eax, %r15d
	movl	%r15d, %esi
	callq	_CHIPREG_WRITE32
	movq	%rbx, %rdi
	movl	$5, %esi
	movl	%r14d, %edx
	callq	_WaitForDoorbellAck
	sarl	$31, %eax
	andl	$-2, %eax
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MPI_DOORBELL_ACTIVE,4,2        ## @MPI_DOORBELL_ACTIVE
	.comm	_MPI_FUNCTION_HOST_PAGEBUF_ACCESS_CONTROL,4,2 ## @MPI_FUNCTION_HOST_PAGEBUF_ACCESS_CONTROL
	.comm	_MPI_DOORBELL_FUNCTION_SHIFT,4,2 ## @MPI_DOORBELL_FUNCTION_SHIFT
	.no_dead_strip	_mpt_host_page_access_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpt_host_page_access_control
_mpt_host_page_access_control:          ; @mpt_host_page_access_control
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x0, [x0]
	bl	_CHIPREG_READ32
Lloh0:
	adrp	x8, _MPI_DOORBELL_ACTIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MPI_DOORBELL_ACTIVE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	mov	w0, #-1
	b	LBB0_3
LBB0_2:
	ldr	x8, [x20]
	add	x0, x8, #4
	mov	w1, #0
	bl	_CHIPREG_WRITE32
	ldr	x0, [x20]
Lloh3:
	adrp	x8, _MPI_FUNCTION_HOST_PAGEBUF_ACCESS_CONTROL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MPI_FUNCTION_HOST_PAGEBUF_ACCESS_CONTROL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _MPI_DOORBELL_FUNCTION_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MPI_DOORBELL_FUNCTION_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	orr	w1, w8, w21, lsl #12
	bl	_CHIPREG_WRITE32
	mov	x0, x20
	mov	w1, #5
	mov	x2, x19
	bl	_WaitForDoorbellAck
	asr	w8, w0, #31
	and	w0, w8, #0xfffffffe
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MPI_DOORBELL_ACTIVE,4,2        ; @MPI_DOORBELL_ACTIVE
	.comm	_MPI_FUNCTION_HOST_PAGEBUF_ACCESS_CONTROL,4,2 ; @MPI_FUNCTION_HOST_PAGEBUF_ACCESS_CONTROL
	.comm	_MPI_DOORBELL_FUNCTION_SHIFT,4,2 ; @MPI_DOORBELL_FUNCTION_SHIFT
	.no_dead_strip	_mpt_host_page_access_control
.subsections_via_symbols
