	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ib_uverbs_rereg_mr
_ib_uverbs_rereg_mr:                    ## @ib_uverbs_rereg_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, %r13
	leaq	-80(%rbp), %rsi
	movl	$40, %edx
	callq	_uverbs_request
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movl	-80(%rbp), %eax
	testl	%eax, %eax
	je	LBB0_8
## %bb.2:
	movq	_IB_MR_REREG_SUPPORTED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	jne	LBB0_8
## %bb.3:
	movq	_IB_MR_REREG_TRANS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.4:
	movl	-76(%rbp), %eax
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movl	-72(%rbp), %ecx
	testl	%ecx, %ecx
	je	LBB0_8
## %bb.6:
	cmpq	$0, -64(%rbp)
	jle	LBB0_8
## %bb.7:
	movq	_PAGE_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	xorl	%eax, %ecx
	testl	%edx, %ecx
	je	LBB0_10
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_UVERBS_OBJECT_MR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-48(%rbp), %esi
	movq	%r13, %rdx
	callq	_uobj_get_write
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%r14, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_12:
	movq	(%r14), %r15
	cmpq	$0, 24(%r15)
	je	LBB0_16
## %bb.13:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_14:
	subl	(%rax), %ebx
LBB0_15:
	movq	%r14, %rdi
	callq	_uobj_put_write
	jmp	LBB0_9
LBB0_16:
	movl	-80(%rbp), %esi
	movq	_IB_MR_REREG_ACCESS@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_19
## %bb.17:
	movl	-56(%rbp), %edi
	callq	_ib_check_mr_access
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.18:
	movl	-80(%rbp), %esi
LBB0_19:
	movq	_IB_MR_REREG_PD@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_22
## %bb.20:
	movq	_UVERBS_OBJECT_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-52(%rbp), %edx
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	movq	%r13, %rcx
	callq	_uobj_get_obj_read
	testq	%rax, %rax
	je	LBB0_29
## %bb.21:
	movq	%rax, %r12
	movl	-80(%rbp), %esi
	jmp	LBB0_23
LBB0_22:
	xorl	%r12d, %r12d
LBB0_23:
	movq	8(%r15), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	16(%r15), %rax
	movq	-64(%rbp), %rcx
	movl	-76(%rbp), %edx
	movl	-72(%rbp), %r8d
	movl	-56(%rbp), %r9d
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	callq	*(%rax)
	addq	$16, %rsp
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_27
## %bb.24:
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	_IB_MR_REREG_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -80(%rbp)
	je	LBB0_26
## %bb.25:
	movq	%r12, %rdi
	callq	_atomic_inc
	movq	%r12, 8(%r15)
	movq	%rbx, %rdi
	callq	_atomic_dec
LBB0_26:
	leaq	-88(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movl	4(%r15), %eax
	movl	%eax, -84(%rbp)
	movl	(%r15), %eax
	movl	%eax, -88(%rbp)
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	$8, %edx
	callq	_uverbs_response
	movl	%eax, %ebx
LBB0_27:
	movq	_IB_MR_REREG_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -80(%rbp)
	je	LBB0_15
## %bb.28:
	movq	%r12, %rdi
	callq	_uobj_put_obj_read
	jmp	LBB0_15
LBB0_29:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_MR_REREG_SUPPORTED,4,2      ## @IB_MR_REREG_SUPPORTED
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IB_MR_REREG_TRANS,4,2          ## @IB_MR_REREG_TRANS
	.comm	_PAGE_MASK,4,2                  ## @PAGE_MASK
	.comm	_UVERBS_OBJECT_MR,4,2           ## @UVERBS_OBJECT_MR
	.comm	_IB_MR_REREG_ACCESS,4,2         ## @IB_MR_REREG_ACCESS
	.comm	_IB_MR_REREG_PD,4,2             ## @IB_MR_REREG_PD
	.comm	_UVERBS_OBJECT_PD,4,2           ## @UVERBS_OBJECT_PD
	.no_dead_strip	_ib_uverbs_rereg_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_rereg_mr
_ib_uverbs_rereg_mr:                    ; @ib_uverbs_rereg_mr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x0
	add	x1, sp, #8
	mov	w2, #40
	bl	_uverbs_request
	mov	x23, x0
	cbnz	w0, LBB0_3
; %bb.1:
	ldr	w8, [sp, #8]
Lloh0:
	adrp	x9, _IB_MR_REREG_SUPPORTED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IB_MR_REREG_SUPPORTED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	bic	w9, w8, w9
	cmp	w8, #0
	ccmp	w9, #0, #0, ne
	b.eq	LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_3:
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_4:
Lloh6:
	adrp	x9, _IB_MR_REREG_TRANS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IB_MR_REREG_TRANS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.5:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_2
; %bb.6:
	ldr	w9, [sp, #16]
	cbz	w9, LBB0_2
; %bb.7:
	ldr	x10, [sp, #24]
	cmp	x10, #1
	b.lt	LBB0_2
; %bb.8:
Lloh9:
	adrp	x10, _PAGE_MASK@GOTPAGE
Lloh10:
	ldr	x10, [x10, _PAGE_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	eor	w8, w9, w8
	bics	wzr, w8, w10
	b.ne	LBB0_2
LBB0_9:
Lloh12:
	adrp	x8, _UVERBS_OBJECT_MR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _UVERBS_OBJECT_MR@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	w1, [sp, #40]
	mov	x2, x19
	bl	_uobj_get_write
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_PTR_ERR
	mov	x23, x0
	b	LBB0_3
LBB0_11:
	ldr	x21, [x20]
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_14
LBB0_12:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_13:
	mov	x0, x20
	bl	_uobj_put_write
	b	LBB0_3
LBB0_14:
	ldr	w1, [sp, #8]
Lloh18:
	adrp	x8, _IB_MR_REREG_ACCESS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IB_MR_REREG_ACCESS@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_17
; %bb.15:
	ldr	w0, [sp, #32]
	bl	_ib_check_mr_access
	mov	x23, x0
	cbnz	w0, LBB0_13
; %bb.16:
	ldr	w1, [sp, #8]
LBB0_17:
Lloh21:
	adrp	x25, _IB_MR_REREG_PD@GOTPAGE
Lloh22:
	ldr	x25, [x25, _IB_MR_REREG_PD@GOTPAGEOFF]
	ldr	w8, [x25]
	tst	w8, w1
	b.eq	LBB0_20
; %bb.18:
Lloh23:
	adrp	x8, _UVERBS_OBJECT_PD@GOTPAGE
Lloh24:
	ldr	x8, [x8, _UVERBS_OBJECT_PD@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	ldr	w2, [sp, #36]
	mov	x0, #0
	mov	x3, x19
	bl	_uobj_get_obj_read
	cbz	x0, LBB0_12
; %bb.19:
	mov	x22, x0
	ldr	w1, [sp, #8]
	b	LBB0_21
LBB0_20:
	mov	x22, #0
LBB0_21:
	ldp	x24, x8, [x21, #8]
	ldr	x8, [x8]
	ldr	x3, [sp, #24]
	ldp	w2, w4, [sp, #12]
	ldr	w5, [sp, #32]
	mov	x0, x21
	mov	x6, x22
	mov	x7, x19
	blr	x8
	mov	x23, x0
	cbnz	w0, LBB0_25
; %bb.22:
	ldr	w8, [sp, #8]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_24
; %bb.23:
	mov	x0, x22
	bl	_atomic_inc
	str	x22, [x21, #8]
	mov	x0, x24
	bl	_atomic_dec
LBB0_24:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	d0, [x21]
	str	d0, [sp]
	mov	x1, sp
	mov	x0, x19
	mov	w2, #8
	bl	_uverbs_response
	mov	x23, x0
LBB0_25:
	ldr	w8, [sp, #8]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.26:
	mov	x0, x22
	bl	_uobj_put_obj_read
	b	LBB0_13
	.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 AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_MR_REREG_SUPPORTED,4,2      ; @IB_MR_REREG_SUPPORTED
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IB_MR_REREG_TRANS,4,2          ; @IB_MR_REREG_TRANS
	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
	.comm	_UVERBS_OBJECT_MR,4,2           ; @UVERBS_OBJECT_MR
	.comm	_IB_MR_REREG_ACCESS,4,2         ; @IB_MR_REREG_ACCESS
	.comm	_IB_MR_REREG_PD,4,2             ; @IB_MR_REREG_PD
	.comm	_UVERBS_OBJECT_PD,4,2           ; @UVERBS_OBJECT_PD
	.no_dead_strip	_ib_uverbs_rereg_mr
.subsections_via_symbols
