	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnxt_re_net_ring_alloc
_bnxt_re_net_ring_alloc:                ## @bnxt_re_net_ring_alloc
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movaps	%xmm0, -128(%rbp)
	movq	$0, -80(%rbp)
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	movq	%r8, %rbx
	movl	%edx, %r13d
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	%r9, -136(%rbp)                 ## 8-byte Spill
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	leaq	-48(%rbp), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_HWRM_RING_ALLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-128(%rbp), %rsi
	movq	%r12, %rdi
	movl	$-1, %ecx
	movl	$-1, %r8d
	callq	_bnxt_re_init_hwrm_hdr
	movq	$0, -88(%rbp)
	movl	(%r14), %edi
	callq	_cpu_to_le64
	movl	%eax, -92(%rbp)
	cmpl	$2, %r13d
	jl	LBB0_4
## %bb.3:
	movq	_BNXT_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	movl	$1, -128(%rbp)
LBB0_4:
	movq	$0, -104(%rbp)
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	callq	_cpu_to_le16
	movl	%eax, -112(%rbp)
	incq	%rbx
	movq	%rbx, %rdi
	callq	_cpu_to_le32
	movl	%eax, -116(%rbp)
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -124(%rbp)
	movq	_RING_ALLOC_REQ_INT_MODE_MSIX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -120(%rbp)
	movq	_DFLT_HWRM_CMD_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	-48(%rbp), %rbx
	leaq	-128(%rbp), %rsi
	leaq	-56(%rbp), %rcx
	movq	%rbx, %rdi
	movl	$56, %edx
	movl	$4, %r8d
	callq	_bnxt_re_fill_fw_msg
	movq	(%r15), %rax
	movq	_BNXT_ROCE_ULP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	*(%rax)
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	16(%rbp), %rbx
	movl	-56(%rbp), %edi
	callq	_le16_to_cpu
	movl	%eax, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HWRM_RING_ALLOC,4,2            ## @HWRM_RING_ALLOC
	.comm	_BNXT_PAGE_SHIFT,4,2            ## @BNXT_PAGE_SHIFT
	.comm	_RING_ALLOC_REQ_INT_MODE_MSIX,4,2 ## @RING_ALLOC_REQ_INT_MODE_MSIX
	.comm	_DFLT_HWRM_CMD_TIMEOUT,4,2      ## @DFLT_HWRM_CMD_TIMEOUT
	.comm	_BNXT_ROCE_ULP,4,2              ## @BNXT_ROCE_ULP
	.no_dead_strip	_bnxt_re_net_ring_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnxt_re_net_ring_alloc
_bnxt_re_net_ring_alloc:                ; @bnxt_re_net_ring_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	ldr	x20, [x0]
	str	xzr, [sp, #64]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #32]
	str	q0, [sp, #16]
	cbz	x20, LBB0_5
; %bb.1:
	mov	x19, x6
	mov	x23, x5
	mov	x22, x4
	mov	x21, x3
	mov	x24, x2
	mov	x25, x1
	mov	x26, x0
	mov	x0, sp
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh0:
	adrp	x8, _HWRM_RING_ALLOC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HWRM_RING_ALLOC@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x1, sp, #16
	mov	x0, x26
	mov	w3, #-1
	mov	w4, #-1
	bl	_bnxt_re_init_hwrm_hdr
	str	xzr, [sp, #56]
	ldr	w0, [x25]
	bl	_cpu_to_le64
	str	w0, [sp, #52]
	cmp	w24, #2
	b.lt	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _BNXT_PAGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BNXT_PAGE_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	w9, #1
	str	w8, [sp, #48]
	str	w9, [sp, #16]
LBB0_3:
	str	xzr, [sp, #40]
	mov	x0, x23
	bl	_cpu_to_le16
	str	w0, [sp, #32]
	add	x0, x22, #1
	bl	_cpu_to_le32
	str	w0, [sp, #28]
Lloh6:
	adrp	x8, _RING_ALLOC_REQ_INT_MODE_MSIX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RING_ALLOC_REQ_INT_MODE_MSIX@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	stp	w21, w8, [sp, #20]
Lloh9:
	adrp	x8, _DFLT_HWRM_CMD_TIMEOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DFLT_HWRM_CMD_TIMEOUT@GOTPAGEOFF]
Lloh11:
	ldr	w5, [x8]
	mov	x0, sp
	add	x1, sp, #16
	add	x3, sp, #8
	mov	w2, #56
	mov	w4, #4
	bl	_bnxt_re_fill_fw_msg
	ldr	x8, [x20]
	ldr	x8, [x8]
Lloh12:
	adrp	x9, _BNXT_ROCE_ULP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _BNXT_ROCE_ULP@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x9]
	mov	x2, sp
	mov	x0, x20
	blr	x8
	cbnz	w0, LBB0_6
; %bb.4:
	ldr	w0, [sp, #8]
	bl	_le16_to_cpu
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_6
LBB0_5:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HWRM_RING_ALLOC,4,2            ; @HWRM_RING_ALLOC
	.comm	_BNXT_PAGE_SHIFT,4,2            ; @BNXT_PAGE_SHIFT
	.comm	_RING_ALLOC_REQ_INT_MODE_MSIX,4,2 ; @RING_ALLOC_REQ_INT_MODE_MSIX
	.comm	_DFLT_HWRM_CMD_TIMEOUT,4,2      ; @DFLT_HWRM_CMD_TIMEOUT
	.comm	_BNXT_ROCE_ULP,4,2              ; @BNXT_ROCE_ULP
	.no_dead_strip	_bnxt_re_net_ring_alloc
.subsections_via_symbols
