	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_roce_rereg_user_mr         ## -- Begin function hns_roce_rereg_user_mr
	.p2align	4, 0x90
_hns_roce_rereg_user_mr:                ## @hns_roce_rereg_user_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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, %r13d
	movl	%ecx, %r14d
	movl	%edx, -76(%rbp)                 ## 4-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	24(%rbp), %rax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movq	16(%rbp), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movl	(%rdi), %edi
	callq	_to_hr_dev
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_to_hr_mr
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	movq	%r14, -104(%rbp)                ## 8-byte Spill
	movq	%rax, %r14
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	16(%r15), %r13
	movq	%r15, %rdi
	callq	_hns_roce_alloc_cmd_mailbox
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.19:
	movq	%rbx, %rdi
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_18
LBB0_3:
	movq	%r13, -96(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movl	12(%r14), %edi
	callq	_key_to_hw_index
	movslq	8(%r15), %rcx
	decq	%rcx
	movslq	%eax, %r13
	andq	%rcx, %r13
	movl	4(%rbx), %edx
	movq	_HNS_ROCE_CMD_QUERY_MPT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_HNS_ROCE_CMD_TIMEOUT_MSECS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r13, %rcx
	xorl	%r8d, %r8d
	pushq	%rax
	callq	_hns_roce_cmd_mbox
	addq	$16, %rsp
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.4:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdx
	callq	_hns_roce_hw2sw_mpt
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_dev_warn
LBB0_6:
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movl	$0, (%r13)
	movq	_IB_MR_REREG_PD@GOTPCREL(%rip), %rax
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, (%rax)
	je	LBB0_8
## %bb.7:
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	callq	_to_hr_pd
	movl	(%rax), %r14d
LBB0_8:
	movq	_IB_MR_REREG_TRANS@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_10
## %bb.9:
	subq	$8, %rsp
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	-76(%rbp), %edx                 ## 4-byte Reload
	movq	-104(%rbp), %rcx                ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	pushq	-120(%rbp)                      ## 8-byte Folded Reload
	pushq	%r14
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	pushq	%rbx
	callq	_rereg_mr_trans
	addq	$32, %rsp
	jmp	LBB0_11
LBB0_10:
	movq	(%r15), %r10
	movl	%ebx, %edx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %eax
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%r14d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	pushq	%rax
	pushq	-104(%rbp)                      ## 8-byte Folded Reload
	callq	*(%r10)
	addq	$16, %rsp
LBB0_11:
	movl	%eax, %r14d
	testl	%eax, %eax
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	jne	LBB0_14
## %bb.12:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_hns_roce_sw2hw_mpt
	testl	%eax, %eax
	je	LBB0_15
## %bb.13:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_dev_err
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edi
	callq	_ib_umem_release
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_14:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_hns_roce_free_cmd_mailbox
LBB0_18:
	movl	%r14d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	$1, (%rdx)
	movq	_IB_MR_REREG_ACCESS@GOTPCREL(%rip), %rax
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, (%rax)
	je	LBB0_17
## %bb.16:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%rdx)
LBB0_17:
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_hns_roce_free_cmd_mailbox
	xorl	%r14d, %r14d
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HNS_ROCE_CMD_QUERY_MPT,4,2     ## @HNS_ROCE_CMD_QUERY_MPT
	.comm	_HNS_ROCE_CMD_TIMEOUT_MSECS,4,2 ## @HNS_ROCE_CMD_TIMEOUT_MSECS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HW2SW_MPT failed (%d)\n"

	.comm	_IB_MR_REREG_PD,4,2             ## @IB_MR_REREG_PD
	.comm	_IB_MR_REREG_TRANS,4,2          ## @IB_MR_REREG_TRANS
L_.str.1:                               ## @.str.1
	.asciz	"SW2HW_MPT failed (%d)\n"

	.comm	_IB_MR_REREG_ACCESS,4,2         ## @IB_MR_REREG_ACCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_roce_rereg_user_mr         ; -- Begin function hns_roce_rereg_user_mr
	.p2align	2
_hns_roce_rereg_user_mr:                ; @hns_roce_rereg_user_mr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x27, x7
	mov	x20, x6
	mov	x23, x5
	mov	x25, x4
	mov	x26, x3
	mov	x28, x2
	mov	x21, x1
	mov	x24, x0
	ldr	w0, [x0]
	bl	_to_hr_dev
	mov	x19, x0
	mov	x0, x24
	bl	_to_hr_mr
	ldr	w8, [x0]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x22, x0
	stp	w26, w21, [sp, #40]             ; 8-byte Folded Spill
	mov	x26, x25
	ldr	x25, [x19, #16]
	mov	x0, x19
	bl	_hns_roce_alloc_cmd_mailbox
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_PTR_ERR
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_17
LBB0_4:
	str	x25, [sp, #24]                  ; 8-byte Folded Spill
	str	w23, [sp, #36]                  ; 4-byte Folded Spill
	ldr	w0, [x22, #12]
	bl	_key_to_hw_index
                                        ; kill: def $w0 killed $w0 def $x0
	ldrsw	x8, [x19, #8]
	sub	x8, x8, #1
	sxtw	x9, w0
	and	x25, x8, x9
	ldr	w2, [x21, #4]
Lloh3:
	adrp	x8, _HNS_ROCE_CMD_QUERY_MPT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HNS_ROCE_CMD_QUERY_MPT@GOTPAGEOFF]
Lloh5:
	ldr	w5, [x8]
Lloh6:
	adrp	x8, _HNS_ROCE_CMD_TIMEOUT_MSECS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HNS_ROCE_CMD_TIMEOUT_MSECS@GOTPAGEOFF]
Lloh8:
	ldr	w6, [x8]
	mov	x0, x19
	mov	w1, #0
	mov	x3, x25
	mov	w4, #0
	bl	_hns_roce_cmd_mbox
	mov	x23, x0
	cbnz	w0, LBB0_16
; %bb.5:
	mov	x0, x19
	mov	x1, #0
	str	x25, [sp, #16]                  ; 8-byte Folded Spill
	mov	x2, x25
	bl	_hns_roce_hw2sw_mpt
	cbz	w0, LBB0_7
; %bb.6:
	mov	x2, x0
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	bl	_dev_warn
LBB0_7:
	str	wzr, [x22]
Lloh11:
	adrp	x8, _IB_MR_REREG_PD@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IB_MR_REREG_PD@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [sp, #44]                   ; 4-byte Folded Reload
	tst	w8, w9
	ldr	w23, [sp, #36]                  ; 4-byte Folded Reload
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_to_hr_pd
	ldr	w7, [x0]
	b	LBB0_10
LBB0_9:
	mov	w7, #0
LBB0_10:
	ldp	w6, w2, [sp, #40]               ; 8-byte Folded Reload
Lloh14:
	adrp	x8, _IB_MR_REREG_TRANS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IB_MR_REREG_TRANS@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_12
; %bb.11:
	str	x27, [sp]
	mov	x0, x24
	mov	x1, x2
	mov	x2, x28
	mov	x3, x6
	mov	x4, x26
	mov	x5, x23
	mov	x6, x21
	bl	_rereg_mr_trans
	b	LBB0_13
LBB0_12:
	ldr	x8, [x19]
	ldr	x9, [x8]
	ldr	w8, [x21]
	mov	x0, x19
	mov	x1, x22
	mov	x3, x7
	mov	x4, x23
	mov	x5, x26
	mov	x7, x8
	blr	x9
LBB0_13:
	mov	x23, x0
	ldr	x2, [sp, #16]                   ; 8-byte Folded Reload
	cbnz	w0, LBB0_16
; %bb.14:
	mov	x0, x19
	mov	x1, x21
	bl	_hns_roce_sw2hw_mpt
	cbz	w0, LBB0_18
; %bb.15:
	mov	x23, x0
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	mov	x2, x23
	bl	_dev_err
	ldr	w0, [x22, #8]
	bl	_ib_umem_release
LBB0_16:
	mov	x0, x19
	mov	x1, x21
	bl	_hns_roce_free_cmd_mailbox
LBB0_17:
	mov	x0, x23
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_18:
	mov	w8, #1
	str	w8, [x22]
Lloh19:
	adrp	x8, _IB_MR_REREG_ACCESS@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IB_MR_REREG_ACCESS@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [sp, #44]                   ; 4-byte Folded Reload
	tst	w8, w9
	b.eq	LBB0_20
; %bb.19:
	ldr	w8, [sp, #36]                   ; 4-byte Folded Reload
	str	w8, [x22, #4]
LBB0_20:
	mov	x0, x19
	mov	x1, x21
	bl	_hns_roce_free_cmd_mailbox
	mov	w23, #0
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HNS_ROCE_CMD_QUERY_MPT,4,2     ; @HNS_ROCE_CMD_QUERY_MPT
	.comm	_HNS_ROCE_CMD_TIMEOUT_MSECS,4,2 ; @HNS_ROCE_CMD_TIMEOUT_MSECS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HW2SW_MPT failed (%d)\n"

	.comm	_IB_MR_REREG_PD,4,2             ; @IB_MR_REREG_PD
	.comm	_IB_MR_REREG_TRANS,4,2          ; @IB_MR_REREG_TRANS
l_.str.1:                               ; @.str.1
	.asciz	"SW2HW_MPT failed (%d)\n"

	.comm	_IB_MR_REREG_ACCESS,4,2         ; @IB_MR_REREG_ACCESS
.subsections_via_symbols
