	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_mr_hw_get_mpt             ## -- Begin function mlx4_mr_hw_get_mpt
	.p2align	4, 0x90
_mlx4_mr_hw_get_mpt:                    ## @mlx4_mr_hw_get_mpt
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movl	8(%rsi), %edi
	callq	_key_to_hw_index
	movq	(%rbx), %rcx
	movq	_MLX4_MPT_EN_HW@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_1
## %bb.2:
	movl	(%r12), %r13d
	decl	%r13d
	andl	%eax, %r13d
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	%r13d, %edx
	callq	_mlx4_HW2SW_MPT
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_mlx4_warn
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_mlx4_warn
	jmp	LBB0_14
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_14:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_MLX4_MPT_EN_SW@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	%r12, %rdi
	callq	_mlx4_is_mfunc
	movq	%r12, %rdi
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	callq	_mlx4_alloc_cmd_mailbox
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.15:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_5:
	callq	_mlx4_priv
	xorl	%ebx, %ebx
	movq	%rax, %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	callq	_mlx4_table_find
	movq	(%r14), %rcx
	movq	%rax, (%rcx)
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_12
LBB0_11:
	xorl	%r15d, %r15d
	cmpq	$0, (%rax)
	jne	LBB0_14
	jmp	LBB0_12
LBB0_7:
	movl	4(%rbx), %edx
	movq	_MLX4_CMD_QUERY_MPT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_MLX4_CMD_TIME_CLASS_B@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_MLX4_CMD_WRAPPED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	%r13d, %ecx
	xorl	%r8d, %r8d
	pushq	%rax
	pushq	%r10
	callq	_mlx4_cmd_box
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %r15d
	jmp	LBB0_13
LBB0_9:
	movq	%rbx, (%r14)
	movq	%rbx, %rax
	testq	%rax, %rax
	jne	LBB0_11
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_13:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_mlx4_free_cmd_mailbox
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_MPT_EN_HW,8,3             ## @MLX4_MPT_EN_HW
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HW2SW_MPT failed (%d)."

L_.str.1:                               ## @.str.1
	.asciz	"Most likely the MR has MWs bound to it.\n"

	.comm	_MLX4_MPT_EN_SW,8,3             ## @MLX4_MPT_EN_SW
	.comm	_MLX4_CMD_QUERY_MPT,4,2         ## @MLX4_CMD_QUERY_MPT
	.comm	_MLX4_CMD_TIME_CLASS_B,4,2      ## @MLX4_CMD_TIME_CLASS_B
	.comm	_MLX4_CMD_WRAPPED,4,2           ## @MLX4_CMD_WRAPPED
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_mr_hw_get_mpt             ; -- Begin function mlx4_mr_hw_get_mpt
	.p2align	2
_mlx4_mr_hw_get_mpt:                    ; @mlx4_mr_hw_get_mpt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x1, #8]
	bl	_key_to_hw_index
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _MLX4_MPT_EN_HW@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX4_MPT_EN_HW@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x19]
	sub	w8, w8, #1
	and	w22, w8, w0
	mov	x0, x19
	mov	x1, #0
	mov	x2, x22
	bl	_mlx4_HW2SW_MPT
	cbz	w0, LBB0_5
; %bb.2:
	mov	x23, x0
	str	x23, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mlx4_warn
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mlx4_warn
	b	LBB0_4
LBB0_3:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_4:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
Lloh10:
	adrp	x8, _MLX4_MPT_EN_SW@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MLX4_MPT_EN_SW@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	str	x8, [x21]
	mov	x0, x19
	bl	_mlx4_is_mfunc
	cbz	w0, LBB0_8
; %bb.6:
	mov	x0, x19
	bl	_mlx4_alloc_cmd_mailbox
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.7:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_PTR_ERR
LBB0_8:
	mov	x0, x19
	bl	_mlx4_priv
	mov	x1, x22
	mov	x2, #0
	bl	_mlx4_table_find
	mov	x21, #0
	ldr	x8, [x20]
	str	x0, [x8]
	ldr	x8, [x20]
	cbz	x8, LBB0_14
LBB0_9:
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.10:
	mov	w23, #0
	b	LBB0_4
LBB0_11:
	ldr	w2, [x21, #4]
Lloh13:
	adrp	x8, _MLX4_CMD_QUERY_MPT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MLX4_CMD_QUERY_MPT@GOTPAGEOFF]
Lloh15:
	ldr	w5, [x8]
Lloh16:
	adrp	x8, _MLX4_CMD_TIME_CLASS_B@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MLX4_CMD_TIME_CLASS_B@GOTPAGEOFF]
Lloh18:
	ldr	w6, [x8]
Lloh19:
	adrp	x8, _MLX4_CMD_WRAPPED@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MLX4_CMD_WRAPPED@GOTPAGEOFF]
Lloh21:
	ldr	w7, [x8]
	mov	x0, x19
	mov	w1, #0
	mov	x3, x22
	mov	w4, #0
	bl	_mlx4_cmd_box
	cbz	w0, LBB0_13
; %bb.12:
	mov	x23, x0
	b	LBB0_15
LBB0_13:
	str	x21, [x20]
	mov	x8, x21
	cbnz	x8, LBB0_9
LBB0_14:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_15:
	mov	x0, x19
	mov	x1, x21
	bl	_mlx4_free_cmd_mailbox
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_MPT_EN_HW,8,3             ; @MLX4_MPT_EN_HW
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HW2SW_MPT failed (%d)."

l_.str.1:                               ; @.str.1
	.asciz	"Most likely the MR has MWs bound to it.\n"

	.comm	_MLX4_MPT_EN_SW,8,3             ; @MLX4_MPT_EN_SW
	.comm	_MLX4_CMD_QUERY_MPT,4,2         ; @MLX4_CMD_QUERY_MPT
	.comm	_MLX4_CMD_TIME_CLASS_B,4,2      ; @MLX4_CMD_TIME_CLASS_B
	.comm	_MLX4_CMD_WRAPPED,4,2           ; @MLX4_CMD_WRAPPED
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
