	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnxt_qplib_alloc_mrw           ## -- Begin function bnxt_qplib_alloc_mrw
	.p2align	4, 0x90
_bnxt_qplib_alloc_mrw:                  ## @bnxt_qplib_alloc_mrw
	.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	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	(%rdi), %r14
	movq	_ALLOCATE_MRW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-40(%rbp), %rax
	movq	%rax, 16(%rsp)
	movups	-56(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	xorl	%esi, %esi
	callq	_RCFW_CMD_PREP
	movq	32(%r15), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movl	%eax, -40(%rbp)
	movq	(%r15), %rax
	movq	%rax, -56(%rbp)
	movq	_CMDQ_ALLOCATE_MRW_MRW_FLAGS_PMR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_BNXT_QPLIB_FR_PMR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 8(%r15)
	jne	LBB0_4
LBB0_2:
	movq	_CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2A@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movq	_CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
LBB0_4:
	movq	_CMDQ_ALLOCATE_MRW_ACCESS_CONSUMER_OWNED_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
LBB0_5:
	movq	%r15, %rdi
	callq	_cpu_to_le64
	movl	%eax, -48(%rbp)
	leaq	-56(%rbp), %rsi
	leaq	-32(%rbp), %rdx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_bnxt_qplib_rcfw_send_message
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	(%r15), %rax
	movq	_CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	movq	_CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2A@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%dl
	orb	%cl, %dl
	movq	_CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%r14b
	orb	%dl, %r14b
	movl	-32(%rbp), %edi
	callq	_le32_to_cpu
	movzbl	%r14b, %ecx
	movq	%rax, 16(%r15,%rcx,8)
LBB0_7:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ALLOCATE_MRW,4,2               ## @ALLOCATE_MRW
	.comm	_CMDQ_ALLOCATE_MRW_MRW_FLAGS_PMR,8,3 ## @CMDQ_ALLOCATE_MRW_MRW_FLAGS_PMR
	.comm	_BNXT_QPLIB_FR_PMR,4,2          ## @BNXT_QPLIB_FR_PMR
	.comm	_CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2A,8,3 ## @CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2A
	.comm	_CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B,8,3 ## @CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B
	.comm	_CMDQ_ALLOCATE_MRW_ACCESS_CONSUMER_OWNED_KEY,4,2 ## @CMDQ_ALLOCATE_MRW_ACCESS_CONSUMER_OWNED_KEY
	.comm	_CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE1,8,3 ## @CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnxt_qplib_alloc_mrw           ; -- Begin function bnxt_qplib_alloc_mrw
	.p2align	2
_bnxt_qplib_alloc_mrw:                  ; @bnxt_qplib_alloc_mrw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _ALLOCATE_MRW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ALLOCATE_MRW@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	w2, #0
	bl	_RCFW_CMD_PREP
	ldr	x8, [x19, #32]
	ldr	w0, [x8]
	bl	_cpu_to_le32
	str	w0, [sp, #24]
	ldr	x8, [x19]
	str	x8, [sp, #8]
Lloh3:
	adrp	x9, _CMDQ_ALLOCATE_MRW_MRW_FLAGS_PMR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CMDQ_ALLOCATE_MRW_MRW_FLAGS_PMR@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x21, _CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2A@GOTPAGE
Lloh7:
	ldr	x21, [x21, _CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2A@GOTPAGEOFF]
Lloh8:
	adrp	x22, _CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B@GOTPAGE
Lloh9:
	ldr	x22, [x22, _CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w9, [x19, #8]
Lloh10:
	adrp	x10, _BNXT_QPLIB_FR_PMR@GOTPAGE
Lloh11:
	ldr	x10, [x10, _BNXT_QPLIB_FR_PMR@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_3
LBB0_2:
	ldr	x9, [x21]
	ldr	x10, [x22]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_4
LBB0_3:
Lloh13:
	adrp	x8, _CMDQ_ALLOCATE_MRW_ACCESS_CONSUMER_OWNED_KEY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CMDQ_ALLOCATE_MRW_ACCESS_CONSUMER_OWNED_KEY@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [sp, #20]
LBB0_4:
	mov	x0, x19
	bl	_cpu_to_le64
	str	w0, [sp, #16]
	add	x1, sp, #8
	mov	x2, sp
	mov	x0, x20
	mov	x3, #0
	mov	w4, #0
	bl	_bnxt_qplib_rcfw_send_message
	mov	x20, x0
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	x23, [x19]
Lloh16:
	adrp	x8, _CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE1@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE1@GOTPAGEOFF]
Lloh18:
	ldr	x24, [x8]
	ldr	x21, [x21]
	ldr	x22, [x22]
	ldr	w0, [sp]
	bl	_le32_to_cpu
	cmp	x23, x22
	ccmp	x23, x21, #4, ne
	ccmp	x23, x24, #4, ne
	mov	w8, #16
	mov	w9, #24
	csel	x8, x9, x8, eq
	str	x0, [x19, x8]
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ALLOCATE_MRW,4,2               ; @ALLOCATE_MRW
	.comm	_CMDQ_ALLOCATE_MRW_MRW_FLAGS_PMR,8,3 ; @CMDQ_ALLOCATE_MRW_MRW_FLAGS_PMR
	.comm	_BNXT_QPLIB_FR_PMR,4,2          ; @BNXT_QPLIB_FR_PMR
	.comm	_CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2A,8,3 ; @CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2A
	.comm	_CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B,8,3 ; @CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B
	.comm	_CMDQ_ALLOCATE_MRW_ACCESS_CONSUMER_OWNED_KEY,4,2 ; @CMDQ_ALLOCATE_MRW_ACCESS_CONSUMER_OWNED_KEY
	.comm	_CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE1,8,3 ; @CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE1
.subsections_via_symbols
