	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns3_fill_desc
_hns3_fill_desc:                        ## @hns3_fill_desc
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r12d
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, %r14d
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	shlq	$3, %rax
	leaq	(%rax,%rax,2), %rax
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%rax), %r15
	callq	_ring_to_dev
	movq	_DESC_TYPE_SKB@GOTPCREL(%rip), %rcx
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	cmpl	%r12d, (%rcx)
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	jne	LBB0_3
## %bb.1:
	movq	%rax, %r12
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	callq	_hns3_fill_skb_desc
	movq	%rbx, %r14
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_16
## %bb.2:
	movl	(%r13), %esi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_dma_map_single
	movq	%r14, %rbx
	jmp	LBB0_4
LBB0_3:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	%rax, %r12
	movq	%rax, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	callq	_skb_frag_dma_map
LBB0_4:
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, %r13
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_6
## %bb.5:
	leaq	24(%rbx), %r14
	movq	%r14, %rdi
	callq	_u64_stats_update_begin
	incl	28(%rbx)
	movq	%r14, %rdi
	callq	_u64_stats_update_end
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_6:
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movq	-104(%rbp), %r13                ## 8-byte Reload
	leaq	(%r14,%r13), %r12
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r12)
	movq	_HNS3_MAX_BD_SIZE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	%eax, (%rcx)
	setae	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	$0, -60(%rbp)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%r13,%r14)
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdi, 8(%r13,%r14)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r13,%r14)
	callq	_cpu_to_le64
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	movq	%rax, 16(%r12,%r14)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_le16
	movq	%rax, 8(%r12,%r14)
	leaq	-60(%rbp), %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_hns3_set_txbd_baseinfo
	movl	-60(%rbp), %edi
	callq	_cpu_to_le16
	movq	%rax, (%r15)
	movq	_next_to_use@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ring_ptr_move_fw
LBB0_15:
	xorl	%ebx, %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edi
	callq	_hns3_tx_bd_count
	movq	_HNS3_TX_LAST_SIZE_M@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r14d
	movq	_HNS3_MAX_BD_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	cmovel	%edi, %r14d
	testl	%eax, %eax
	je	LBB0_15
## %bb.9:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	decl	%eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	xorl	%r13d, %r13d
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	setne	%r14b
	movl	$0, -56(%rbp)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%r12)
	imull	%r13d, %edi
	addq	-88(%rbp), %rdi                 ## 8-byte Folded Reload
	movq	%rdi, 8(%r12)
	movq	_DESC_TYPE_SKB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	xorl	-48(%rbp), %ecx                 ## 4-byte Folded Reload
	orl	%r13d, %ecx
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_DESC_TYPE_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	%eax, 4(%r12)
	callq	_cpu_to_le64
	movq	%rax, 16(%r15)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	-72(%rbp), %r12d                ## 4-byte Reload
	cmpl	%r13d, %r12d
	sete	%bl
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_HNS3_MAX_BD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	callq	_cpu_to_le16
	movq	%rax, 8(%r15)
	andb	%bl, %r14b
	movzbl	%r14b, %esi
	leaq	-56(%rbp), %rdi
	callq	_hns3_set_txbd_baseinfo
	movl	-56(%rbp), %edi
	callq	_cpu_to_le16
	movq	%rax, (%r15)
	movq	_next_to_use@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_ring_ptr_move_fw
	cmpl	%r13d, %r12d
	je	LBB0_15
## %bb.17:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	(%rbx), %rax
	shlq	$3, %rax
	leaq	(%rax,%rax,2), %r12
	movq	8(%rbx), %r15
	addq	%r12, %r15
	addq	16(%rbx), %r12
	movq	_HNS3_MAX_BD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	incl	%r13d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_DESC_TYPE_SKB,4,2              ## @DESC_TYPE_SKB
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HNS3_MAX_BD_SIZE,4,2           ## @HNS3_MAX_BD_SIZE
	.comm	_next_to_use,4,2                ## @next_to_use
	.comm	_HNS3_TX_LAST_SIZE_M,4,2        ## @HNS3_TX_LAST_SIZE_M
	.comm	_DESC_TYPE_PAGE,4,2             ## @DESC_TYPE_PAGE
	.no_dead_strip	_hns3_fill_desc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns3_fill_desc
_hns3_fill_desc:                        ; @hns3_fill_desc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x4
	str	w3, [sp, #20]                   ; 4-byte Folded Spill
	mov	x25, x2
	mov	x23, x1
	mov	x19, x0
	ldp	x28, x8, [x0, #8]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x27, [x0]
	add	x8, x27, x27, lsl #1
	lsl	x20, x8, #3
	add	x21, x28, x20
	bl	_ring_to_dev
	mov	x26, x0
Lloh0:
	adrp	x8, _DESC_TYPE_SKB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DESC_TYPE_SKB@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x21
	bl	_hns3_fill_skb_desc
	mov	x24, x0
	bl	_unlikely
	cbnz	x0, LBB0_9
; %bb.2:
	ldr	w1, [x23]
Lloh3:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x26
	mov	x2, x25
	bl	_dma_map_single
	b	LBB0_4
LBB0_3:
Lloh6:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	mov	x0, x26
	mov	x1, x23
	mov	w2, #0
	mov	x3, x25
	bl	_skb_frag_dma_map
LBB0_4:
	mov	x24, x0
	mov	x0, x26
	mov	x1, x24
	bl	_dma_mapping_error
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.5:
	add	x20, x19, #24
	mov	x0, x20
	bl	_u64_stats_update_begin
	ldr	w8, [x19, #28]
	add	w8, w8, #1
	str	w8, [x19, #28]
	mov	x0, x20
	bl	_u64_stats_update_end
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_9
LBB0_6:
	ldr	x26, [sp, #8]                   ; 8-byte Folded Reload
	add	x20, x26, x20
	str	w25, [x20]
Lloh12:
	adrp	x8, _HNS3_MAX_BD_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HNS3_MAX_BD_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w8, w25
	cset	w0, hs
	bl	_likely
	cbz	x0, LBB0_10
; %bb.7:
	str	wzr, [sp, #28]
	add	x8, x27, x27, lsl #1
	lsl	x20, x8, #3
	add	x8, x26, x20
	stp	x24, x23, [x8, #8]
	str	w22, [x8, #4]
	mov	x0, x24
	bl	_cpu_to_le64
	add	x20, x28, x20
	str	x0, [x20, #16]
	mov	x0, x25
	bl	_cpu_to_le16
	str	x0, [x20, #8]
	add	x0, sp, #28
	ldr	w1, [sp, #20]                   ; 4-byte Folded Reload
	bl	_hns3_set_txbd_baseinfo
	ldr	w0, [sp, #28]
	bl	_cpu_to_le16
	str	x0, [x21]
Lloh15:
	adrp	x8, _next_to_use@GOTPAGE
Lloh16:
	ldr	x8, [x8, _next_to_use@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ring_ptr_move_fw
LBB0_8:
	mov	w24, #0
LBB0_9:
	mov	x0, x24
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_10:
	mov	x0, x25
	bl	_hns3_tx_bd_count
Lloh18:
	adrp	x8, _HNS3_TX_LAST_SIZE_M@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HNS3_TX_LAST_SIZE_M@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x8]
Lloh21:
	adrp	x10, _HNS3_MAX_BD_SIZE@GOTPAGE
Lloh22:
	ldr	x10, [x10, _HNS3_MAX_BD_SIZE@GOTPAGEOFF]
	ldr	w8, [x10]
	ands	w9, w9, w25
	csel	w9, w8, w9, eq
	str	w9, [sp, #8]                    ; 4-byte Folded Spill
	cbz	w0, LBB0_8
; %bb.11:
	mov	w27, #0
	sub	w28, w0, #1
	mov	x25, x10
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [sp, #20]                   ; 4-byte Folded Reload
	cmp	w9, #0
	cset	w26, ne
	str	wzr, [sp, #24]
	mul	w8, w8, w27
	add	x0, x24, x8
	stp	x0, x23, [x20, #8]
Lloh23:
	adrp	x8, _DESC_TYPE_SKB@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DESC_TYPE_SKB@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmp	w27, #0
	ccmp	w8, w22, #0, eq
Lloh26:
	adrp	x9, _DESC_TYPE_PAGE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _DESC_TYPE_PAGE@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	csel	w8, w9, w8, ne
	str	w8, [x20, #4]
	bl	_cpu_to_le64
	str	x0, [x21, #16]
	ldr	w8, [x25]
	cmp	w28, w27
	ldr	w9, [sp, #8]                    ; 4-byte Folded Reload
	csel	w0, w9, w8, eq
	cset	w20, eq
	bl	_cpu_to_le16
	str	x0, [x21, #8]
	and	w1, w26, w20
	add	x0, sp, #24
	bl	_hns3_set_txbd_baseinfo
	ldr	w0, [sp, #24]
	bl	_cpu_to_le16
	str	x0, [x21]
Lloh29:
	adrp	x8, _next_to_use@GOTPAGE
Lloh30:
	ldr	x8, [x8, _next_to_use@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ring_ptr_move_fw
	cmp	w28, w27
	b.eq	LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldp	x10, x8, [x19, #8]
	ldr	x9, [x19]
	add	x9, x9, x9, lsl #1
	lsl	x9, x9, #3
	add	x21, x10, x9
	add	x20, x8, x9
	ldr	w8, [x25]
	add	w27, w27, #1
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_DESC_TYPE_SKB,4,2              ; @DESC_TYPE_SKB
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HNS3_MAX_BD_SIZE,4,2           ; @HNS3_MAX_BD_SIZE
	.comm	_next_to_use,4,2                ; @next_to_use
	.comm	_HNS3_TX_LAST_SIZE_M,4,2        ; @HNS3_TX_LAST_SIZE_M
	.comm	_DESC_TYPE_PAGE,4,2             ; @DESC_TYPE_PAGE
	.no_dead_strip	_hns3_fill_desc
.subsections_via_symbols
