	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mthca_mmap_uar
_mthca_mmap_uar:                        ## @mthca_mmap_uar
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rsi), %rax
	subq	8(%rsi), %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	16(%rsi), %edi
	callq	_pgprot_noncached
	movl	%eax, 16(%rbx)
	movq	8(%rbx), %r15
	movq	%r14, %rdi
	callq	_to_mucontext
	movl	(%rax), %edx
	movq	(%r12), %rcx
	movl	16(%rbx), %r8d
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_io_remap_pfn_range
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_3:
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_mthca_mmap_uar
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mthca_mmap_uar
_mthca_mmap_uar:                        ; @mthca_mmap_uar
	.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
	ldp	x8, x9, [x1]
Lloh0:
	adrp	x22, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PAGE_SIZE@GOTPAGEOFF]
	ldr	x10, [x22]
	sub	x8, x8, x9
	cmp	x8, x10
	b.ne	LBB0_3
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x1, #16]
	bl	_pgprot_noncached
	str	w0, [x19, #16]
	ldr	x21, [x19, #8]
	mov	x0, x20
	bl	_to_mucontext
	ldr	w2, [x0]
	ldr	x3, [x22]
	ldr	w4, [x19, #16]
	mov	x0, x19
	mov	x1, x21
	bl	_io_remap_pfn_range
	cbz	x0, LBB0_5
; %bb.2:
Lloh2:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_mthca_mmap_uar
.subsections_via_symbols
