	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns3_init_ring_hw
_hns3_init_ring_hw:                     ## @hns3_init_ring_hw
	.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
	movl	(%rdi), %ebx
	movq	16(%rdi), %r14
	callq	_HNAE3_IS_TX_RING
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_HNS3_RING_TX_RING_BASEADDR_L_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_hns3_write_dev
	movq	_HNS3_RING_TX_RING_BASEADDR_H_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	sarl	$31, %ebx
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_hns3_write_dev
	movq	_HNS3_RING_TX_RING_BD_NUM_REG@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_HNS3_RING_RX_RING_BASEADDR_L_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_hns3_write_dev
	movq	_HNS3_RING_RX_RING_BASEADDR_H_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	sarl	$31, %ebx
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_hns3_write_dev
	movq	_HNS3_RING_RX_RING_BD_LEN_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	8(%r15), %edi
	callq	_hns3_buf_size2type
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_hns3_write_dev
	movq	_HNS3_RING_RX_RING_BD_NUM_REG@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %esi
	movl	4(%r15), %eax
	leal	7(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$3, %edx
	decl	%edx
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hns3_write_dev                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HNS3_RING_RX_RING_BASEADDR_L_REG,4,2 ## @HNS3_RING_RX_RING_BASEADDR_L_REG
	.comm	_HNS3_RING_RX_RING_BASEADDR_H_REG,4,2 ## @HNS3_RING_RX_RING_BASEADDR_H_REG
	.comm	_HNS3_RING_RX_RING_BD_LEN_REG,4,2 ## @HNS3_RING_RX_RING_BD_LEN_REG
	.comm	_HNS3_RING_RX_RING_BD_NUM_REG,4,2 ## @HNS3_RING_RX_RING_BD_NUM_REG
	.comm	_HNS3_RING_TX_RING_BASEADDR_L_REG,4,2 ## @HNS3_RING_TX_RING_BASEADDR_L_REG
	.comm	_HNS3_RING_TX_RING_BASEADDR_H_REG,4,2 ## @HNS3_RING_TX_RING_BASEADDR_H_REG
	.comm	_HNS3_RING_TX_RING_BD_NUM_REG,4,2 ## @HNS3_RING_TX_RING_BD_NUM_REG
	.no_dead_strip	_hns3_init_ring_hw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns3_init_ring_hw
_hns3_init_ring_hw:                     ; @hns3_init_ring_hw
	.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	x20, x0
	ldr	w21, [x0]
	ldr	x19, [x0, #16]
	bl	_HNAE3_IS_TX_RING
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _HNS3_RING_TX_RING_BASEADDR_L_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HNS3_RING_TX_RING_BASEADDR_L_REG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_hns3_write_dev
Lloh3:
	adrp	x8, _HNS3_RING_TX_RING_BASEADDR_H_REG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HNS3_RING_TX_RING_BASEADDR_H_REG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	asr	w2, w21, #31
	mov	x0, x19
	bl	_hns3_write_dev
Lloh6:
	adrp	x8, _HNS3_RING_TX_RING_BD_NUM_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HNS3_RING_TX_RING_BD_NUM_REG@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x8, _HNS3_RING_RX_RING_BASEADDR_L_REG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HNS3_RING_RX_RING_BASEADDR_L_REG@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_hns3_write_dev
Lloh11:
	adrp	x8, _HNS3_RING_RX_RING_BASEADDR_H_REG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HNS3_RING_RX_RING_BASEADDR_H_REG@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	asr	w2, w21, #31
	mov	x0, x19
	bl	_hns3_write_dev
Lloh14:
	adrp	x8, _HNS3_RING_RX_RING_BD_LEN_REG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HNS3_RING_RX_RING_BD_LEN_REG@GOTPAGEOFF]
Lloh16:
	ldr	w21, [x8]
	ldr	w0, [x20, #8]
	bl	_hns3_buf_size2type
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_hns3_write_dev
Lloh17:
	adrp	x8, _HNS3_RING_RX_RING_BD_NUM_REG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HNS3_RING_RX_RING_BD_NUM_REG@GOTPAGEOFF]
LBB0_3:
	ldr	w1, [x8]
	ldr	w8, [x20, #4]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #3
	sub	w2, w8, #1
	mov	x0, x19
	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
	b	_hns3_write_dev
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_HNS3_RING_RX_RING_BASEADDR_L_REG,4,2 ; @HNS3_RING_RX_RING_BASEADDR_L_REG
	.comm	_HNS3_RING_RX_RING_BASEADDR_H_REG,4,2 ; @HNS3_RING_RX_RING_BASEADDR_H_REG
	.comm	_HNS3_RING_RX_RING_BD_LEN_REG,4,2 ; @HNS3_RING_RX_RING_BD_LEN_REG
	.comm	_HNS3_RING_RX_RING_BD_NUM_REG,4,2 ; @HNS3_RING_RX_RING_BD_NUM_REG
	.comm	_HNS3_RING_TX_RING_BASEADDR_L_REG,4,2 ; @HNS3_RING_TX_RING_BASEADDR_L_REG
	.comm	_HNS3_RING_TX_RING_BASEADDR_H_REG,4,2 ; @HNS3_RING_TX_RING_BASEADDR_H_REG
	.comm	_HNS3_RING_TX_RING_BD_NUM_REG,4,2 ; @HNS3_RING_TX_RING_BD_NUM_REG
	.no_dead_strip	_hns3_init_ring_hw
.subsections_via_symbols
