	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qede_alloc_rx_buffer           ## -- Begin function qede_alloc_rx_buffer
	.p2align	4, 0x90
_qede_alloc_rx_buffer:                  ## @qede_alloc_rx_buffer
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	testl	%esi, %esi
	je	LBB0_3
## %bb.1:
	xorl	%edi, %edi
	cmpl	$13, (%r14)
	setge	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	decl	(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_3:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_alloc_pages
	movq	%rax, %r15
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	40(%r14), %edi
	movl	44(%r14), %r8d
	xorl	%ebx, %ebx
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_dma_map_page
	movl	%eax, %r12d
	movl	40(%r14), %edi
	movl	%eax, %esi
	callq	_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	___free_page
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	32(%r14), %rax
	movq	_NUM_RX_BDS_MAX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andq	8(%r14), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movq	$0, 16(%rax,%rcx,8)
	movq	%r15, 8(%rax,%rcx,8)
	movl	%r12d, (%rax,%rcx,8)
	leaq	24(%r14), %rdi
	callq	_qed_chain_produce
	movq	%rax, %r15
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON
	movl	%r12d, %edi
	callq	_upper_32_bits
	movq	%rax, %rdi
	callq	_cpu_to_le32
	movq	%rax, 8(%r15)
	movl	%r12d, %edi
	callq	_lower_32_bits
	addq	16(%r14), %rax
	movq	%rax, %rdi
	callq	_cpu_to_le32
	movq	%rax, (%r15)
	incq	8(%r14)
	incl	(%r14)
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_NUM_RX_BDS_MAX,8,3             ## @NUM_RX_BDS_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qede_alloc_rx_buffer           ; -- Begin function qede_alloc_rx_buffer
	.p2align	2
_qede_alloc_rx_buffer:                  ; @qede_alloc_rx_buffer
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	cbz	w1, LBB0_4
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, #12
	cset	w0, gt
	bl	_likely
	cbz	x0, LBB0_4
; %bb.2:
	mov	w0, #0
	ldr	w8, [x19]
	sub	w8, w8, #1
LBB0_3:
	str	w8, [x19]
	b	LBB0_8
LBB0_4:
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_alloc_pages
	mov	x20, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_7
; %bb.5:
Lloh3:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	ldp	w0, w4, [x19, #40]
	mov	x1, x20
	mov	w2, #0
	bl	_dma_map_page
	mov	x21, x0
	ldr	w0, [x19, #40]
	mov	x1, x21
	bl	_dma_mapping_error
	bl	_unlikely
	cbz	x0, LBB0_9
; %bb.6:
	mov	x0, x20
	bl	___free_page
LBB0_7:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	x8, [x19, #32]
	ldr	x9, [x19, #8]
Lloh9:
	adrp	x10, _NUM_RX_BDS_MAX@GOTPAGE
Lloh10:
	ldr	x10, [x10, _NUM_RX_BDS_MAX@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	and	x9, x10, x9
	mov	w10, #24
	madd	x8, x9, x10, x8
	stp	x20, xzr, [x8, #8]
	str	w21, [x8]
	add	x0, x19, #24
	bl	_qed_chain_produce
	mov	x20, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON
	mov	x0, x21
	bl	_upper_32_bits
	bl	_cpu_to_le32
	str	x0, [x20, #8]
	mov	x0, x21
	bl	_lower_32_bits
	ldr	x8, [x19, #16]
	add	x0, x8, x0
	bl	_cpu_to_le32
	mov	x8, x0
	mov	w0, #0
	str	x8, [x20]
	ldr	x8, [x19, #8]
	add	x8, x8, #1
	str	x8, [x19, #8]
	ldr	w8, [x19]
	add	w8, w8, #1
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_NUM_RX_BDS_MAX,8,3             ; @NUM_RX_BDS_MAX
.subsections_via_symbols
