	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocxl_context_mmap              ## -- Begin function ocxl_context_mmap
	.p2align	4, 0x90
_ocxl_context_mmap:                     ## @ocxl_context_mmap
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movl	(%rsi), %eax
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	(%rdi), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_2
## %bb.1:
	movq	%rbx, %rsi
	callq	_check_mmap_mmio
	jmp	LBB0_3
LBB0_2:
	movq	%rbx, %rsi
	callq	_check_mmap_afu_irq
LBB0_3:
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	_VM_IO@GOTPCREL(%rip), %rax
	movq	_VM_PFNMAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	orl	%ecx, 4(%rbx)
	movl	16(%rbx), %edi
	callq	_pgprot_noncached
	movl	%eax, 16(%rbx)
	movq	_ocxl_vmops@GOTPCREL(%rip), %rax
	movq	%rax, 8(%rbx)
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_VM_IO,4,2                      ## @VM_IO
	.comm	_VM_PFNMAP,4,2                  ## @VM_PFNMAP
	.comm	_ocxl_vmops,4,2                 ## @ocxl_vmops
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocxl_context_mmap              ; -- Begin function ocxl_context_mmap
	.p2align	2
_ocxl_context_mmap:                     ; @ocxl_context_mmap
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
Lloh0:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	w9, [x1]
Lloh2:
	ldr	w8, [x8]
	lsl	w8, w9, w8
	ldr	x9, [x0]
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_2
; %bb.1:
	bl	_check_mmap_mmio
	mov	x20, x0
	cbnz	w0, LBB0_4
	b	LBB0_3
LBB0_2:
	bl	_check_mmap_afu_irq
	mov	x20, x0
	cbnz	w0, LBB0_4
LBB0_3:
Lloh3:
	adrp	x8, _VM_IO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VM_IO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _VM_PFNMAP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _VM_PFNMAP@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x19, #4]
	orr	w8, w8, w9
	str	w8, [x19, #4]
	ldr	w0, [x19, #16]
	bl	_pgprot_noncached
	str	w0, [x19, #16]
Lloh9:
	adrp	x8, _ocxl_vmops@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ocxl_vmops@GOTPAGEOFF]
	str	x8, [x19, #8]
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_VM_IO,4,2                      ; @VM_IO
	.comm	_VM_PFNMAP,4,2                  ; @VM_PFNMAP
	.comm	_ocxl_vmops,4,2                 ; @ocxl_vmops
.subsections_via_symbols
