	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_ib_mmap
_mlx4_ib_mmap:                          ## @mlx4_ib_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_to_mdev
	movq	(%rbx), %rcx
	subq	8(%rbx), %rcx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rcx
	jne	LBB0_9
## %bb.1:
	movq	%rax, %r15
	movl	16(%rbx), %eax
	cmpl	$1, %eax
	je	LBB0_6
## %bb.2:
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	movl	20(%rbx), %edi
	callq	_pgprot_noncached
	movl	%eax, 20(%rbx)
	movq	8(%rbx), %r15
	movq	%r14, %rdi
	callq	_to_mucontext
	movq	(%rax), %rdx
	movq	(%r13), %rcx
	movl	20(%rbx), %r8d
	movq	%rbx, %rdi
	movq	%r15, %rsi
	jmp	LBB0_4
LBB0_6:
	movq	(%r15), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.7:
	movl	20(%rbx), %edi
	callq	_pgprot_writecombine
	movl	%eax, 20(%rbx)
	movq	8(%rbx), %r12
	movq	%r14, %rdi
	callq	_to_mucontext
	movq	(%r15), %rcx
	movq	8(%rcx), %rdx
	addq	(%rax), %rdx
	movq	(%r13), %rcx
	movl	20(%rbx), %r8d
	movq	%rbx, %rdi
	movq	%r12, %rsi
LBB0_4:
	callq	_io_remap_pfn_range
	testq	%rax, %rax
	je	LBB0_5
## %bb.8:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_10:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%eax, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_mlx4_ib_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_ib_mmap
_mlx4_ib_mmap:                          ; @mlx4_ib_mmap
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0]
	bl	_to_mdev
	ldp	x8, x9, [x19]
Lloh0:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
	ldr	x10, [x23]
	sub	x8, x8, x9
	cmp	x8, x10
	b.ne	LBB0_7
; %bb.1:
	ldr	w8, [x19, #16]
	cmp	w8, #1
	b.eq	LBB0_4
; %bb.2:
	cbnz	w8, LBB0_7
; %bb.3:
	ldr	w0, [x19, #20]
	bl	_pgprot_noncached
	str	w0, [x19, #20]
	ldr	x21, [x19, #8]
	mov	x0, x20
	bl	_to_mucontext
	ldr	x2, [x0]
	ldr	x3, [x23]
	ldr	w4, [x19, #20]
	mov	x0, x19
	mov	x1, x21
	bl	_io_remap_pfn_range
	cbnz	x0, LBB0_6
	b	LBB0_9
LBB0_4:
	mov	x21, x0
	ldr	x8, [x0]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.5:
	ldr	w0, [x19, #20]
	bl	_pgprot_writecombine
	str	w0, [x19, #20]
	ldr	x22, [x19, #8]
	mov	x0, x20
	bl	_to_mucontext
	ldr	x8, [x0]
	ldr	x9, [x21]
	ldr	x9, [x9, #8]
	add	x2, x9, x8
	ldr	x3, [x23]
	ldr	w4, [x19, #20]
	mov	x0, x19
	mov	x1, x22
	bl	_io_remap_pfn_range
	cbz	x0, LBB0_9
LBB0_6:
Lloh2:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 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	_mlx4_ib_mmap
.subsections_via_symbols
