	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uar_mmap
_uar_mmap:                              ## @uar_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, %r15d
	xorl	%eax, %eax
	cmpl	$131, %esi
	setne	%dl
	movq	(%rbx), %rsi
	subq	8(%rbx), %rsi
	movq	%rcx, %r12
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rsi
	jne	LBB0_8
## %bb.1:
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movb	%dl, %al
	movslq	8(%r12,%rax,4), %r14
	movl	20(%rbx), %edi
	cmpl	$131, %r15d
	jne	LBB0_4
## %bb.2:
	callq	_get_extended_index
	movslq	12(%r12), %r13
	addq	%rax, %r13
	cmpq	%r14, %r13
	jb	LBB0_5
LBB0_3:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rdx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_mlx5_ib_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_4:
	callq	_get_index
	movq	%rax, %r13
	cmpq	%r14, %r13
	jae	LBB0_3
LBB0_5:
	leal	-128(%r15), %eax
	cmpl	$3, %eax
	ja	LBB0_8
## %bb.6:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_7:
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_9:
	xorl	%ebx, %ebx
LBB0_10:
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	16(%rbx), %edi
	callq	_pgprot_writecombine
	jmp	LBB0_14
LBB0_13:
	movl	16(%rbx), %edi
	callq	_pgprot_noncached
LBB0_14:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	24(%r12), %rax
	movq	(%rax,%r13,8), %rsi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_uar_index2pfn
	movl	%eax, -48(%rbp)
	leaq	L_.str.4(%rip), %rsi
	leaq	-48(%rbp), %rcx
	movq	%r14, %rdi
	movq	%r13, %rdx
	callq	_mlx5_ib_dbg
	movl	-48(%rbp), %edx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_rdma_user_mmap_io
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_mmap_cmd2str
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_mlx5_ib_err
	jmp	LBB0_11
LBB0_16:
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_12
	.long	L0_0_set_13
	.long	L0_0_set_7
	.end_data_region
                                        ## -- End function
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid uar index %lu, max=%d\n"

	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_MLX5_NON_FP_BFREGS_PER_UAR,4,2 ## @MLX5_NON_FP_BFREGS_PER_UAR
L_.str.4:                               ## @.str.4
	.asciz	"uar idx 0x%lx, pfn %pa\n"

L_.str.5:                               ## @.str.5
	.asciz	"rdma_user_mmap_io failed with error=%d, mmap_cmd=%s\n"

	.no_dead_strip	_uar_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uar_mmap
_uar_mmap:                              ; @uar_mmap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cmp	w1, #131
	mov	w8, #12
	mov	w9, #8
	csel	x8, x9, x8, eq
	ldp	x9, x10, [x2]
Lloh0:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
	ldr	x11, [x25]
	sub	x9, x9, x10
	cmp	x9, x11
	b.ne	LBB0_4
; %bb.1:
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldrsw	x24, [x3, x8]
	ldr	w0, [x2, #20]
	cmp	w1, #131
	b.ne	LBB0_7
; %bb.2:
	bl	_get_extended_index
	ldrsw	x8, [x22, #12]
	add	x23, x0, x8
	cmp	x23, x24
	b.lo	LBB0_8
LBB0_3:
	stp	x23, x24, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mlx5_ib_warn
LBB0_4:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_7:
	bl	_get_index
	mov	x23, x0
	cmp	x23, x24
	b.hs	LBB0_3
LBB0_8:
	sub	w8, w20, #128
	cmp	w8, #3
	b.hi	LBB0_4
; %bb.9:
Lloh6:
	adrp	x9, lJTI0_0@PAGE
Lloh7:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_10
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_10:
Lloh8:
	adrp	x8, _EPERM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_5
LBB0_11:
	ldr	w0, [x21, #16]
	bl	_pgprot_writecombine
	b	LBB0_13
LBB0_12:
	ldr	w0, [x21, #16]
	bl	_pgprot_noncached
LBB0_13:
	mov	x24, x0
	ldr	x8, [x22, #24]
	ldr	x1, [x8, x23, lsl #3]
	mov	x0, x19
	bl	_uar_index2pfn
	str	w0, [sp, #28]
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
	add	x3, sp, #28
	mov	x0, x19
	mov	x2, x23
	bl	_mlx5_ib_dbg
	ldr	w2, [sp, #28]
	ldr	x3, [x25]
	mov	x0, x22
	mov	x1, x21
	mov	x4, x24
	bl	_rdma_user_mmap_io
	mov	x21, x0
	cbz	w0, LBB0_6
; %bb.14:
	mov	x0, x20
	bl	_mmap_cmd2str
	mov	x3, x0
Lloh12:
	adrp	x1, l_.str.5@PAGE
Lloh13:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_mlx5_ib_err
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_10-LBB0_10)>>2
	.byte	(LBB0_11-LBB0_10)>>2
	.byte	(LBB0_12-LBB0_10)>>2
	.byte	(LBB0_10-LBB0_10)>>2
                                        ; -- End function
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid uar index %lu, max=%d\n"

	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_MLX5_NON_FP_BFREGS_PER_UAR,4,2 ; @MLX5_NON_FP_BFREGS_PER_UAR
l_.str.4:                               ; @.str.4
	.asciz	"uar idx 0x%lx, pfn %pa\n"

l_.str.5:                               ; @.str.5
	.asciz	"rdma_user_mmap_io failed with error=%d, mmap_cmd=%s\n"

	.no_dead_strip	_uar_mmap
.subsections_via_symbols
