	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hclge_buffer_alloc             ## -- Begin function hclge_buffer_alloc
	.p2align	4, 0x90
_hclge_buffer_alloc:                    ## @hclge_buffer_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_hclge_tx_buffer_calc
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_18
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_4:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_hclge_tx_buffer_alloc
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_18
LBB0_6:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_hclge_rx_buffer_calc
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	movq	(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_18
LBB0_8:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_hclge_rx_priv_buf_alloc
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %ebx
	movq	(%r15), %rdi
	leaq	L_.str.3(%rip), %rsi
LBB0_18:
	movl	%ebx, %edx
	callq	_dev_err
LBB0_19:
	movq	%r14, %rdi
	callq	_kfree
LBB0_20:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r15, %rdi
	callq	_hnae3_dev_dcb_supported
	testq	%rax, %rax
	je	LBB0_15
## %bb.11:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_hclge_rx_priv_wl_config
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %ebx
	movq	(%r15), %rdi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_18
LBB0_13:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_hclge_common_thrd_config
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movl	%eax, %ebx
	movq	(%r15), %rdi
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_18
LBB0_15:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_hclge_common_wl_config
	testl	%eax, %eax
	je	LBB0_16
## %bb.17:
	movl	%eax, %ebx
	movq	(%r15), %rdi
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_18
LBB0_16:
	xorl	%ebx, %ebx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not calc tx buffer size for all TCs %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"could not alloc tx buffers %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"could not calc rx priv buffer size for all TCs %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"could not alloc rx priv buffer %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"could not configure rx private waterline %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"could not configure common threshold %d\n"

L_.str.6:                               ## @.str.6
	.asciz	"could not configure common waterline %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hclge_buffer_alloc             ; -- Begin function hclge_buffer_alloc
	.p2align	2
_hclge_buffer_alloc:                    ; @hclge_buffer_alloc
	.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	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	mov	x0, x21
	mov	x1, x19
	bl	_hclge_tx_buffer_calc
	cbz	w0, LBB0_4
; %bb.2:
	mov	x20, x0
	ldr	x0, [x21]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_12
LBB0_4:
	mov	x0, x21
	mov	x1, x19
	bl	_hclge_tx_buffer_alloc
	cbz	w0, LBB0_6
; %bb.5:
	mov	x20, x0
	ldr	x0, [x21]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_6:
	mov	x0, x21
	mov	x1, x19
	bl	_hclge_rx_buffer_calc
	cbz	w0, LBB0_8
; %bb.7:
	mov	x20, x0
	ldr	x0, [x21]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_8:
	mov	x0, x21
	mov	x1, x19
	bl	_hclge_rx_priv_buf_alloc
	cbz	w0, LBB0_13
; %bb.9:
	mov	x20, x0
	ldr	x0, [x21]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_10:
	mov	x2, x20
	bl	_dev_err
LBB0_11:
	mov	x0, x19
	bl	_kfree
LBB0_12:
	mov	x0, x20
	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_13:
	mov	x0, x21
	bl	_hnae3_dev_dcb_supported
	cbz	x0, LBB0_18
; %bb.14:
	mov	x0, x21
	mov	x1, x19
	bl	_hclge_rx_priv_wl_config
	cbz	w0, LBB0_16
; %bb.15:
	mov	x20, x0
	ldr	x0, [x21]
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_10
LBB0_16:
	mov	x0, x21
	mov	x1, x19
	bl	_hclge_common_thrd_config
	cbz	w0, LBB0_18
; %bb.17:
	mov	x20, x0
	ldr	x0, [x21]
Lloh16:
	adrp	x1, l_.str.5@PAGE
Lloh17:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_10
LBB0_18:
	mov	x0, x21
	mov	x1, x19
	bl	_hclge_common_wl_config
	mov	x20, x0
	cbz	w0, LBB0_11
; %bb.19:
	ldr	x0, [x21]
Lloh18:
	adrp	x1, l_.str.6@PAGE
Lloh19:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not calc tx buffer size for all TCs %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"could not alloc tx buffers %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"could not calc rx priv buffer size for all TCs %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"could not alloc rx priv buffer %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"could not configure rx private waterline %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"could not configure common threshold %d\n"

l_.str.6:                               ; @.str.6
	.asciz	"could not configure common waterline %d\n"

.subsections_via_symbols
