	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_mmap_afu_irq
_check_mmap_afu_irq:                    ## @check_mmap_afu_irq
	.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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rsi), %esi
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %esi
	callq	_ocxl_irq_offset_to_id
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_vma_pages
	cmpl	$1, %eax
	jne	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_ocxl_afu_irq_get_addr
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movl	4(%r14), %eax
	movq	_VM_READ@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_1
## %bb.4:
	movq	_VM_EXEC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_VM_WRITE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_1
## %bb.6:
	movq	_VM_MAYREAD@GOTPCREL(%rip), %rcx
	movq	_VM_MAYEXEC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%edx
	andl	%edx, %eax
	movl	%eax, 4(%r14)
	xorl	%eax, %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VM_READ,4,2                    ## @VM_READ
	.comm	_VM_EXEC,4,2                    ## @VM_EXEC
	.comm	_VM_WRITE,4,2                   ## @VM_WRITE
	.comm	_VM_MAYREAD,4,2                 ## @VM_MAYREAD
	.comm	_VM_MAYEXEC,4,2                 ## @VM_MAYEXEC
	.no_dead_strip	_check_mmap_afu_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_mmap_afu_irq
_check_mmap_afu_irq:                    ; @check_mmap_afu_irq
	.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, x1
	mov	x20, x0
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	lsl	w1, w8, w9
	bl	_ocxl_irq_offset_to_id
	mov	x21, x0
	mov	x0, x19
	bl	_vma_pages
	cmp	w0, #1
	b.ne	LBB0_4
; %bb.1:
	mov	x0, x20
	mov	x1, x21
	bl	_ocxl_afu_irq_get_addr
	cbz	w0, LBB0_4
; %bb.2:
	ldr	w8, [x19, #4]
Lloh3:
	adrp	x9, _VM_READ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VM_READ@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.3:
Lloh6:
	adrp	x9, _VM_EXEC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _VM_EXEC@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
LBB0_4:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
LBB0_6:
Lloh12:
	adrp	x9, _VM_WRITE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _VM_WRITE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.7:
	mov	w0, #0
Lloh15:
	adrp	x9, _VM_MAYREAD@GOTPAGE
Lloh16:
	ldr	x9, [x9, _VM_MAYREAD@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _VM_MAYEXEC@GOTPAGE
Lloh19:
	ldr	x10, [x10, _VM_MAYEXEC@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	orr	w9, w10, w9
	bic	w8, w8, w9
	str	w8, [x19, #4]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VM_READ,4,2                    ; @VM_READ
	.comm	_VM_EXEC,4,2                    ; @VM_EXEC
	.comm	_VM_WRITE,4,2                   ; @VM_WRITE
	.comm	_VM_MAYREAD,4,2                 ; @VM_MAYREAD
	.comm	_VM_MAYEXEC,4,2                 ; @VM_MAYEXEC
	.no_dead_strip	_check_mmap_afu_irq
.subsections_via_symbols
