	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_ib_rereg_user_mr          ## -- Begin function mlx5_ib_rereg_user_mr
	.p2align	4, 0x90
_mlx5_ib_rereg_user_mr:                 ## @mlx5_ib_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r13d
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	8(%rdi), %edi
	callq	_to_mdev
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_to_mmr
	movq	%rax, %rcx
	movq	_IB_MR_REREG_PD@GOTPCREL(%rip), %rdx
	movl	%r14d, %eax
	testl	%r14d, (%rdx)
	movq	%r15, -112(%rbp)                ## 8-byte Spill
	je	LBB0_2
## %bb.1:
	movq	16(%rbp), %rdx
	jmp	LBB0_3
LBB0_2:
	movq	(%r15), %rdx
LBB0_3:
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movl	%eax, %r15d
	movq	%rcx, %r14
	movq	_IB_MR_REREG_ACCESS@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	jne	LBB0_5
## %bb.4:
	movl	(%r14), %r13d
LBB0_5:
	movl	$0, -56(%rbp)
	movl	$0, -52(%rbp)
	movl	$0, -68(%rbp)
	movl	$0, -96(%rbp)
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movq	%rbx, %rdx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	%r13, %r9
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_mlx5_ib_dbg
	movl	56(%r14), %edi
	movq	(%r12), %rsi
	callq	_atomic_sub
	cmpq	$0, 8(%r14)
	je	LBB0_6
## %bb.8:
	movq	%r14, %rdi
	callq	_is_odp_mr
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_37
LBB0_10:
	movq	%r14, %rbx
	addq	$8, %rbx
	movq	_IB_MR_REREG_TRANS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%r15d, %edx
	jne	LBB0_12
## %bb.11:
	movq	(%rbx), %rax
	movq	(%rax), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
LBB0_12:
	movq	_IB_MR_REREG_PD@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	jne	LBB0_14
## %bb.13:
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	jmp	LBB0_17
LBB0_14:
	movl	%edx, -92(%rbp)                 ## 4-byte Spill
	movq	(%rbx), %rdi
	callq	_ib_umem_release
	movq	$0, (%rbx)
	leaq	-96(%rbp), %rax
	leaq	-68(%rbp), %r10
	leaq	-56(%rbp), %r11
	movq	%r12, %rdi
	leaq	-52(%rbp), %r12
	movq	24(%rbp), %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%r13d, %r8d
	movq	%rbx, %r9
	pushq	%rax
	pushq	%r10
	pushq	%r11
	pushq	%r12
	callq	_mr_umem_get
	addq	$32, %rsp
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	%eax, %r12d
	jmp	LBB0_26
LBB0_16:
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	orl	-92(%rbp), %r15d                ## 4-byte Folded Reload
	movq	-80(%rbp), %r12                 ## 8-byte Reload
LBB0_17:
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_mlx5_ib_can_use_umr
	testl	%eax, %eax
	je	LBB0_20
## %bb.18:
	movq	_IB_MR_REREG_TRANS@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_28
## %bb.19:
	movq	%r14, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_use_umr_mtt_update
	testl	%eax, %eax
	je	LBB0_20
LBB0_28:
	movq	%rbx, 40(%r14)
	movl	%r13d, (%r14)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 32(%r14)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 24(%r14)
	movq	%rbx, %rdi
	callq	_to_mpd
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	_IB_MR_REREG_TRANS@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_34
## %bb.29:
	movq	_MLX5_IB_UPD_XLT_ADDR@GOTPCREL(%rip), %rax
	movq	_IB_MR_REREG_PD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	andl	%r15d, %r8d
	je	LBB0_31
## %bb.30:
	movq	_MLX5_IB_UPD_XLT_PD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
LBB0_31:
	orl	(%rax), %r8d
	movq	_IB_MR_REREG_ACCESS@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	je	LBB0_33
## %bb.32:
	movq	_MLX5_IB_UPD_XLT_ACCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_33:
	orl	%r15d, %r8d
	movl	-52(%rbp), %edx
	movl	-56(%rbp), %ecx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_mlx5_ib_update_xlt
	jmp	LBB0_35
LBB0_20:
	cmpq	$0, 48(%r14)
	je	LBB0_22
## %bb.21:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_unreg_umr
	jmp	LBB0_23
LBB0_22:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_destroy_mkey
LBB0_23:
	movl	%eax, %r12d
	testl	%eax, %eax
	movq	-104(%rbp), %rax                ## 8-byte Reload
	jne	LBB0_26
## %bb.24:
	movq	(%rax), %r8
	movl	-68(%rbp), %r9d
	movl	-56(%rbp), %eax
	subq	$8, %rsp
	movq	-112(%rbp), %r15                ## 8-byte Reload
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	pushq	$1
	pushq	%r13
	pushq	%rax
	callq	_reg_create
	addq	$32, %rsp
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_27
## %bb.25:
	movq	%r14, %rdi
	callq	_PTR_ERR
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_to_mmr
	movq	%rax, %r14
	jmp	LBB0_26
LBB0_34:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	movl	%r15d, %ecx
	callq	_rereg_umr
LBB0_35:
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_36
LBB0_26:
	movq	8(%r14), %rdi
	callq	_ib_umem_release
	movq	$0, 8(%r14)
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_clean_mr
LBB0_37:
	movl	%r12d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	movq	$0, 48(%r14)
LBB0_36:
	movl	-52(%rbp), %edx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%r13d, %r8d
	callq	_set_mr_fields
	xorl	%r12d, %r12d
	jmp	LBB0_37
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_MR_REREG_PD,4,2             ## @IB_MR_REREG_PD
	.comm	_IB_MR_REREG_ACCESS,4,2         ## @IB_MR_REREG_ACCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"start 0x%llx, virt_addr 0x%llx, length 0x%llx, access_flags 0x%x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_IB_MR_REREG_TRANS,4,2          ## @IB_MR_REREG_TRANS
	.comm	_MLX5_IB_UPD_XLT_ADDR,4,2       ## @MLX5_IB_UPD_XLT_ADDR
	.comm	_MLX5_IB_UPD_XLT_PD,4,2         ## @MLX5_IB_UPD_XLT_PD
	.comm	_MLX5_IB_UPD_XLT_ACCESS,4,2     ## @MLX5_IB_UPD_XLT_ACCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_ib_rereg_user_mr          ; -- Begin function mlx5_ib_rereg_user_mr
	.p2align	2
_mlx5_ib_rereg_user_mr:                 ; @mlx5_ib_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	x28, x7
	mov	x24, x6
	mov	x20, x5
	mov	x25, x4
	mov	x21, x3
	mov	x27, x2
	mov	x26, x1
	mov	x23, x0
	ldr	w0, [x0, #8]
	bl	_to_mdev
	mov	x19, x0
	mov	x0, x23
	bl	_to_mmr
	mov	x22, x0
Lloh0:
	adrp	x8, _IB_MR_REREG_PD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_MR_REREG_PD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w26
	b.ne	LBB0_2
; %bb.1:
	ldr	x24, [x23]
LBB0_2:
Lloh3:
	adrp	x8, _IB_MR_REREG_ACCESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_MR_REREG_ACCESS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w26
	b.ne	LBB0_4
; %bb.3:
	ldr	w20, [x22]
LBB0_4:
	stp	xzr, xzr, [sp, #32]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x27
	mov	x3, x25
	mov	x4, x21
	mov	x5, x20
	bl	_mlx5_ib_dbg
	ldr	w0, [x22, #56]
	ldr	x1, [x19]
	bl	_atomic_sub
	mov	x27, x22
	ldr	x8, [x27, #8]!
	cbz	x8, LBB0_7
; %bb.5:
	mov	x0, x22
	bl	_is_odp_mr
	cbz	x0, LBB0_9
; %bb.6:
Lloh8:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w28, w8
	b	LBB0_27
LBB0_9:
	str	x24, [sp, #24]                  ; 8-byte Folded Spill
Lloh12:
	adrp	x8, _IB_MR_REREG_TRANS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IB_MR_REREG_TRANS@GOTPAGEOFF]
Lloh14:
	ldr	w24, [x8]
	tst	w24, w26
	b.ne	LBB0_11
; %bb.10:
	ldr	x8, [x27]
	ldp	x21, x25, [x8]
LBB0_11:
Lloh15:
	adrp	x8, _IB_MR_REREG_PD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IB_MR_REREG_PD@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w8, w26
	b.eq	LBB0_15
; %bb.12:
	ldr	x0, [x27]
	bl	_ib_umem_release
	str	xzr, [x27]
	add	x8, sp, #32
	add	x9, sp, #36
	stp	x9, x8, [sp]
	add	x6, sp, #40
	add	x7, sp, #44
	mov	x0, x19
	mov	x1, x28
	mov	x2, x25
	mov	x3, x21
	mov	x4, x20
	mov	x5, x27
	bl	_mr_umem_get
	cbz	w0, LBB0_14
; %bb.13:
	mov	x28, x0
	b	LBB0_26
LBB0_14:
	orr	w26, w24, w26
LBB0_15:
	ldr	x24, [sp, #24]                  ; 8-byte Folded Reload
Lloh18:
	adrp	x28, _IB_MR_REREG_TRANS@GOTPAGE
Lloh19:
	ldr	x28, [x28, _IB_MR_REREG_TRANS@GOTPAGEOFF]
	mov	x0, x19
	mov	w1, #1
	bl	_mlx5_ib_can_use_umr
	cbz	w0, LBB0_20
; %bb.16:
	ldr	w8, [x28]
	tst	w8, w26
	b.eq	LBB0_18
; %bb.17:
	mov	x0, x22
	mov	x1, x25
	mov	x2, x21
	bl	_use_umr_mtt_update
	cbz	w0, LBB0_20
LBB0_18:
	stp	x25, x24, [x22, #32]
	str	w20, [x22]
	str	x21, [x22, #24]
	mov	x0, x24
	bl	_to_mpd
	ldr	w8, [x0]
	str	w8, [x22, #16]
	ldr	w8, [x28]
	tst	w8, w26
	b.eq	LBB0_25
; %bb.19:
Lloh20:
	adrp	x8, _MLX5_IB_UPD_XLT_ADDR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MLX5_IB_UPD_XLT_ADDR@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _IB_MR_REREG_PD@GOTPAGE
Lloh24:
	ldr	x9, [x9, _IB_MR_REREG_PD@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
Lloh26:
	adrp	x10, _MLX5_IB_UPD_XLT_PD@GOTPAGE
Lloh27:
	ldr	x10, [x10, _MLX5_IB_UPD_XLT_PD@GOTPAGEOFF]
Lloh28:
	ldr	w10, [x10]
	tst	w9, w26
	csel	w9, wzr, w10, eq
	orr	w8, w9, w8
Lloh29:
	adrp	x9, _IB_MR_REREG_ACCESS@GOTPAGE
Lloh30:
	ldr	x9, [x9, _IB_MR_REREG_ACCESS@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
Lloh32:
	adrp	x10, _MLX5_IB_UPD_XLT_ACCESS@GOTPAGE
Lloh33:
	ldr	x10, [x10, _MLX5_IB_UPD_XLT_ACCESS@GOTPAGEOFF]
Lloh34:
	ldr	w10, [x10]
	tst	w9, w26
	csel	w9, wzr, w10, eq
	orr	w4, w8, w9
	ldp	w2, w3, [sp, #40]
	mov	x0, x22
	mov	w1, #0
	bl	_mlx5_ib_update_xlt
	mov	x28, x0
	cbnz	w0, LBB0_26
	b	LBB0_29
LBB0_20:
	ldr	x8, [x22, #48]
	cbz	x8, LBB0_22
; %bb.21:
	mov	x0, x19
	mov	x1, x22
	bl	_unreg_umr
	mov	x28, x0
	cbnz	w0, LBB0_26
	b	LBB0_23
LBB0_22:
	mov	x0, x19
	mov	x1, x22
	bl	_destroy_mkey
	mov	x28, x0
	cbnz	w0, LBB0_26
LBB0_23:
	ldr	x4, [x27]
	ldr	w5, [sp, #36]
	ldr	w6, [sp, #44]
	mov	w8, #1
	str	w8, [sp]
	mov	x0, x23
	mov	x1, x24
	mov	x2, x25
	mov	x3, x21
	mov	x7, x20
	bl	_reg_create
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_28
; %bb.24:
	mov	x0, x22
	bl	_PTR_ERR
	mov	x28, x0
	mov	x0, x23
	bl	_to_mmr
	mov	x22, x0
	b	LBB0_26
LBB0_25:
	mov	x0, x24
	mov	x1, x22
	mov	x2, x20
	mov	x3, x26
	bl	_rereg_umr
	mov	x28, x0
	cbz	w0, LBB0_29
LBB0_26:
	ldr	x0, [x22, #8]
	bl	_ib_umem_release
	str	xzr, [x22, #8]
	mov	x0, x19
	mov	x1, x22
	bl	_clean_mr
LBB0_27:
	mov	x0, x28
	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_28:
	str	xzr, [x22, #48]
LBB0_29:
	ldr	w2, [sp, #40]
	mov	x0, x19
	mov	x1, x22
	mov	x3, x21
	mov	x4, x20
	bl	_set_mr_fields
	mov	w28, #0
	b	LBB0_27
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_MR_REREG_PD,4,2             ; @IB_MR_REREG_PD
	.comm	_IB_MR_REREG_ACCESS,4,2         ; @IB_MR_REREG_ACCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"start 0x%llx, virt_addr 0x%llx, length 0x%llx, access_flags 0x%x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_IB_MR_REREG_TRANS,4,2          ; @IB_MR_REREG_TRANS
	.comm	_MLX5_IB_UPD_XLT_ADDR,4,2       ; @MLX5_IB_UPD_XLT_ADDR
	.comm	_MLX5_IB_UPD_XLT_PD,4,2         ; @MLX5_IB_UPD_XLT_PD
	.comm	_MLX5_IB_UPD_XLT_ACCESS,4,2     ; @MLX5_IB_UPD_XLT_ACCESS
.subsections_via_symbols
