	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ib_uverbs_reg_mr
_ib_uverbs_reg_mr:                      ## @ib_uverbs_reg_mr
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	leaq	-64(%rbp), %rsi
	movl	$20, %edx
	callq	_uverbs_request
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.1:
	movq	_PAGE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movl	-60(%rbp), %ecx
	xorl	-64(%rbp), %ecx
	testl	%eax, %ecx
	je	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_3:
	movl	-56(%rbp), %edi
	callq	_ib_check_mr_access
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.4:
	movq	_UVERBS_OBJECT_MR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-88(%rbp), %rdx
	movq	%r12, %rsi
	callq	_uobj_alloc
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_18
LBB0_6:
	movq	_UVERBS_OBJECT_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-48(%rbp), %edx
	movq	%r12, %rcx
	callq	_uobj_get_obj_read
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r15
	movl	-56(%rbp), %r8d
	movq	_IB_ACCESS_ON_DEMAND@GOTPCREL(%rip), %rcx
	movq	8(%rax), %rax
	testl	%r8d, (%rcx)
	je	LBB0_11
## %bb.9:
	movq	_IB_DEVICE_ON_DEMAND_PAGING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 8(%rax)
	je	LBB0_10
LBB0_11:
	movl	-52(%rbp), %edx
	movl	-64(%rbp), %esi
	movl	-60(%rbp), %ecx
	movq	%r15, %rdi
	movq	%r12, %r9
	callq	*(%rax)
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%r13, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_16
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_13:
	movq	8(%r15), %rax
	movq	%rax, 72(%r13)
	movq	%r15, 64(%r13)
	movq	_IB_MR_TYPE_USER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%r13)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%r13)
	movq	%r14, 32(%r13)
	movq	%r15, %rdi
	callq	_atomic_inc
	movq	_RDMA_RESTRACK_MR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r13, %rdi
	addq	$24, %rdi
	movl	%eax, 24(%r13)
	callq	_rdma_restrack_uadd
	movq	%r13, 16(%r14)
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movl	8(%r13), %eax
	movl	%eax, -72(%rbp)
	movl	4(%r13), %eax
	movl	%eax, -76(%rbp)
	movl	(%r14), %eax
	movl	%eax, -80(%rbp)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	$12, %edx
	callq	_uverbs_response
	testl	%eax, %eax
	je	LBB0_14
## %bb.15:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_uverbs_get_cleared_udata
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_ib_dereg_mr_user
	jmp	LBB0_16
LBB0_10:
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_16:
	movq	%r15, %rdi
	callq	_uobj_put_obj_read
LBB0_17:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_uobj_alloc_abort
LBB0_18:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	%r15, %rdi
	callq	_uobj_put_obj_read
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_uobj_alloc_commit
	movl	%eax, %ebx
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_MASK,4,2                  ## @PAGE_MASK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_UVERBS_OBJECT_MR,4,2           ## @UVERBS_OBJECT_MR
	.comm	_UVERBS_OBJECT_PD,4,2           ## @UVERBS_OBJECT_PD
	.comm	_IB_ACCESS_ON_DEMAND,4,2        ## @IB_ACCESS_ON_DEMAND
	.comm	_IB_DEVICE_ON_DEMAND_PAGING,4,2 ## @IB_DEVICE_ON_DEMAND_PAGING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ODP support not available\n"

	.comm	_IB_MR_TYPE_USER,4,2            ## @IB_MR_TYPE_USER
	.comm	_RDMA_RESTRACK_MR,4,2           ## @RDMA_RESTRACK_MR
	.no_dead_strip	_ib_uverbs_reg_mr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ib_uverbs_reg_mr
_ib_uverbs_reg_mr:                      ; @ib_uverbs_reg_mr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x0
	add	x1, sp, #24
	mov	w2, #20
	bl	_uverbs_request
	mov	x22, x0
	cbnz	w0, LBB0_17
; %bb.1:
Lloh0:
	adrp	x8, _PAGE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldp	w9, w10, [sp, #24]
	eor	w9, w10, w9
	bics	wzr, w9, w8
	b.eq	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_17
LBB0_3:
	ldr	w0, [sp, #32]
	bl	_ib_check_mr_access
	mov	x22, x0
	cbnz	w0, LBB0_17
; %bb.4:
Lloh6:
	adrp	x8, _UVERBS_OBJECT_MR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _UVERBS_OBJECT_MR@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x2, sp
	mov	x1, x19
	bl	_uobj_alloc
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_17
LBB0_6:
Lloh9:
	adrp	x8, _UVERBS_OBJECT_PD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _UVERBS_OBJECT_PD@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w2, [sp, #40]
	mov	x3, x19
	bl	_uobj_get_obj_read
	cbz	x0, LBB0_11
; %bb.7:
	mov	x21, x0
	ldr	w4, [sp, #32]
Lloh12:
	adrp	x8, _IB_ACCESS_ON_DEMAND@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IB_ACCESS_ON_DEMAND@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x8]
	ldr	x8, [x0, #8]
	tst	w9, w4
	b.eq	LBB0_9
; %bb.8:
	ldr	w9, [x8, #8]
Lloh15:
	adrp	x10, _IB_DEVICE_ON_DEMAND_PAGING@GOTPAGE
Lloh16:
	ldr	x10, [x10, _IB_DEVICE_ON_DEMAND_PAGING@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_14
LBB0_9:
	ldr	x8, [x8]
	ldr	w2, [sp, #36]
	ldp	w1, w3, [sp, #24]
	mov	x0, x21
	mov	x5, x19
	blr	x8
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.10:
	mov	x0, x23
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_15
LBB0_11:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_16
LBB0_12:
	ldr	x8, [x21, #8]
Lloh21:
	adrp	x9, _IB_MR_TYPE_USER@GOTPAGE
Lloh22:
	ldr	x9, [x9, _IB_MR_TYPE_USER@GOTPAGEOFF]
	stp	x21, x8, [x23, #64]
Lloh23:
	ldr	w8, [x9]
	str	w8, [x23, #56]
	stp	xzr, xzr, [x23, #40]
	str	x20, [x23, #32]
	mov	x0, x21
	bl	_atomic_inc
Lloh24:
	adrp	x8, _RDMA_RESTRACK_MR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _RDMA_RESTRACK_MR@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	mov	x0, x23
	str	w8, [x0, #24]!
	bl	_rdma_restrack_uadd
	str	x23, [x20, #16]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #12
	bl	_memset
	ldur	d0, [x23, #4]
	stur	d0, [sp, #12]
	ldr	w8, [x20]
	str	w8, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #12
	bl	_uverbs_response
	cbz	w0, LBB0_18
; %bb.13:
	mov	x22, x0
	mov	x0, x19
	bl	_uverbs_get_cleared_udata
	mov	x1, x0
	mov	x0, x23
	bl	_ib_dereg_mr_user
	b	LBB0_15
LBB0_14:
Lloh27:
	adrp	x0, l_.str@PAGE
Lloh28:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
Lloh29:
	adrp	x8, _EINVAL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_15:
	mov	x0, x21
	bl	_uobj_put_obj_read
LBB0_16:
	mov	x0, x20
	mov	x1, x19
	bl	_uobj_alloc_abort
LBB0_17:
	mov	x0, x22
	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
	add	sp, sp, #112
	ret
LBB0_18:
	mov	x0, x21
	bl	_uobj_put_obj_read
	mov	x0, x20
	mov	x1, x19
	bl	_uobj_alloc_commit
	mov	x22, x0
	b	LBB0_17
	.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	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_UVERBS_OBJECT_MR,4,2           ; @UVERBS_OBJECT_MR
	.comm	_UVERBS_OBJECT_PD,4,2           ; @UVERBS_OBJECT_PD
	.comm	_IB_ACCESS_ON_DEMAND,4,2        ; @IB_ACCESS_ON_DEMAND
	.comm	_IB_DEVICE_ON_DEMAND_PAGING,4,2 ; @IB_DEVICE_ON_DEMAND_PAGING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ODP support not available\n"

	.comm	_IB_MR_TYPE_USER,4,2            ; @IB_MR_TYPE_USER
	.comm	_RDMA_RESTRACK_MR,4,2           ; @RDMA_RESTRACK_MR
	.no_dead_strip	_ib_uverbs_reg_mr
.subsections_via_symbols
