	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hclge_rx_buffer_calc
_hclge_rx_buffer_calc:                  ## @hclge_rx_buffer_calc
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_hnae3_dev_dcb_supported
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_hclge_only_alloc_priv_buff
	xorl	%r15d, %r15d
	testq	%rax, %rax
	jne	LBB0_8
## %bb.3:
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%r14, %rdx
	callq	_hclge_rx_buf_calc_all
	testq	%rax, %rax
	jne	LBB0_8
## %bb.4:
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_hclge_rx_buf_calc_all
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_hclge_drop_nopfc_buf_till_fit
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_hclge_drop_pfc_buf_till_fit
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_8
LBB0_1:
	movl	(%rbx), %r15d
	movq	%r14, %rdi
	callq	_hclge_get_tx_buff_alloced
	subl	%eax, %r15d
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_hclge_is_rx_buf_ok
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	subl	(%rcx), %r15d
	xorl	%ecx, %ecx
	testl	%eax, %eax
	cmovnel	%ecx, %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_hclge_rx_buffer_calc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hclge_rx_buffer_calc
_hclge_rx_buffer_calc:                  ; @hclge_rx_buffer_calc
	.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, x1
	mov	x20, x0
	bl	_hnae3_dev_dcb_supported
	cbz	w0, LBB0_4
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	bl	_hclge_only_alloc_priv_buff
	cbnz	x0, LBB0_3
; %bb.2:
	mov	x0, x20
	mov	w1, #1
	mov	x2, x19
	bl	_hclge_rx_buf_calc_all
	cbz	x0, LBB0_6
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	ldr	w21, [x20]
	mov	x0, x19
	bl	_hclge_get_tx_buff_alloced
	sub	w2, w21, w0
	mov	x0, x20
	mov	x1, x19
	bl	_hclge_is_rx_buf_ok
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w0, wzr, w8, ne
LBB0_5:
	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_6:
	mov	x0, x20
	mov	w1, #0
	mov	x2, x19
	bl	_hclge_rx_buf_calc_all
	mov	x8, x0
	mov	w0, #0
	cbnz	x8, LBB0_5
; %bb.7:
	mov	x0, x20
	mov	x1, x19
	bl	_hclge_drop_nopfc_buf_till_fit
	cbnz	x0, LBB0_3
; %bb.8:
	mov	x0, x20
	mov	x1, x19
	bl	_hclge_drop_pfc_buf_till_fit
	cbnz	x0, LBB0_3
; %bb.9:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_hclge_rx_buffer_calc
.subsections_via_symbols
