	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lan743x_tx_frame_add_fragment
_lan743x_tx_frame_add_fragment:         ## @lan743x_tx_frame_add_fragment
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	40(%rdi), %rax
	movq	(%rax), %r12
	movq	%rsi, %rdi
	callq	_skb_frag_size
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %r14d
	movq	32(%r15), %rax
	movq	(%r15), %rsi
	movl	8(%r15), %ecx
	movq	%rsi, %rdx
	shlq	$4, %rdx
	movl	%ecx, (%rax,%rdx)
	movq	%r15, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_lan743x_tx_next_index
	movq	%rax, %rbx
	movq	%rax, (%r15)
	movq	24(%r15), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	32(%r15), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r12, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	callq	_skb_frag_dma_map
	movl	%eax, %r13d
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movslq	12(%r15), %rbx
	cmpq	%rbx, (%r15)
	je	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$1, %edx
	callq	_lan743x_tx_release_desc
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_lan743x_tx_next_index
	movq	%rax, %rbx
	movslq	%ebx, %rax
	cmpq	%rax, (%r15)
	jne	LBB0_4
LBB0_5:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dma_wmb
	movq	_TX_FRAME_FLAG_IN_PROGRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 16(%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r15)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_6:
	movl	%r13d, %edi
	callq	_DMA_ADDR_LOW32
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	shlq	$4, %rbx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 12(%rcx,%rbx)
	movl	%r13d, %edi
	callq	_DMA_ADDR_HIGH32
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 8(%rcx,%rbx)
	shll	$16, %r12d
	movq	_TX_DESC_DATA3_FRAME_LENGTH_MSS_MASK_@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	movl	%r12d, 4(%rcx,%rbx)
	xorl	%ebx, %ebx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rax,2), %rax
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	$0, 16(%rsi,%rax,8)
	movl	%r13d, 8(%rsi,%rax,8)
	movl	%r14d, (%rsi,%rax,8)
	movq	_TX_BUFFER_INFO_FLAG_ACTIVE@GOTPCREL(%rip), %rcx
	movl	4(%rsi,%rax,8), %edx
	orl	(%rcx), %edx
	movl	%edx, 4(%rsi,%rax,8)
	movq	_TX_BUFFER_INFO_FLAG_SKB_FRAGMENT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	%edx, 4(%rsi,%rax,8)
	movq	_TX_DESC_DATA0_BUF_LENGTH_MASK_@GOTPCREL(%rip), %rax
	andl	(%rax), %r14d
	movq	_TX_DESC_DATA0_DTYPE_DATA_@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_TX_DESC_DATA0_FCS_@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movl	%r14d, 8(%r15)
LBB0_7:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_TX_FRAME_FLAG_IN_PROGRESS,4,2  ## @TX_FRAME_FLAG_IN_PROGRESS
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_TX_DESC_DATA3_FRAME_LENGTH_MSS_MASK_,4,2 ## @TX_DESC_DATA3_FRAME_LENGTH_MSS_MASK_
	.comm	_TX_BUFFER_INFO_FLAG_ACTIVE,4,2 ## @TX_BUFFER_INFO_FLAG_ACTIVE
	.comm	_TX_BUFFER_INFO_FLAG_SKB_FRAGMENT,4,2 ## @TX_BUFFER_INFO_FLAG_SKB_FRAGMENT
	.comm	_TX_DESC_DATA0_BUF_LENGTH_MASK_,4,2 ## @TX_DESC_DATA0_BUF_LENGTH_MASK_
	.comm	_TX_DESC_DATA0_DTYPE_DATA_,4,2  ## @TX_DESC_DATA0_DTYPE_DATA_
	.comm	_TX_DESC_DATA0_FCS_,4,2         ## @TX_DESC_DATA0_FCS_
	.no_dead_strip	_lan743x_tx_frame_add_fragment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lan743x_tx_frame_add_fragment
_lan743x_tx_frame_add_fragment:         ; @lan743x_tx_frame_add_fragment
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x2
	mov	x24, x1
	mov	x19, x0
	ldr	x8, [x0, #40]
	ldr	x23, [x8]
	mov	x0, x1
	bl	_skb_frag_size
	cbz	w0, LBB0_7
; %bb.1:
	mov	x20, x0
	ldr	x8, [x19, #32]
	ldr	x1, [x19]
	ldr	w9, [x19, #8]
	lsl	x10, x1, #4
	str	w9, [x8, x10]
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_lan743x_tx_next_index
	mov	x22, x0
	str	x0, [x19]
	ldp	x25, x26, [x19, #24]
Lloh0:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	mov	x0, x23
	mov	x1, x24
	mov	w2, #0
	mov	x3, x20
	bl	_skb_frag_dma_map
	mov	x24, x0
	mov	x0, x23
	mov	x1, x24
	bl	_dma_mapping_error
	cbz	x0, LBB0_6
; %bb.2:
	ldrsw	x20, [x19, #12]
	ldr	x8, [x19]
	cmp	x8, x20
	b.eq	LBB0_5
; %bb.3:
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_lan743x_tx_release_desc
	mov	x0, x19
	mov	x1, x20
	bl	_lan743x_tx_next_index
	mov	x20, x0
	ldr	x8, [x19]
	cmp	x8, w20, sxtw
	b.ne	LBB0_4
LBB0_5:
	bl	_dma_wmb
Lloh3:
	adrp	x8, _TX_FRAME_FLAG_IN_PROGRESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TX_FRAME_FLAG_IN_PROGRESS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	bic	w8, w9, w8
	str	w8, [x19, #16]
	stp	xzr, xzr, [x19]
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
	mov	x0, x24
	bl	_DMA_ADDR_LOW32
	add	x23, x26, x22, lsl #4
	str	w0, [x23, #12]
	mov	x0, x24
	bl	_DMA_ADDR_HIGH32
	mov	x8, x0
	mov	w0, #0
	str	w8, [x23, #8]
Lloh9:
	adrp	x8, _TX_DESC_DATA3_FRAME_LENGTH_MSS_MASK_@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TX_DESC_DATA3_FRAME_LENGTH_MSS_MASK_@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	and	w8, w8, w21, lsl #16
	str	w8, [x23, #4]
	mov	w8, #24
	madd	x8, x22, x8, x25
	str	xzr, [x8, #16]
	str	w24, [x8, #8]
	str	w20, [x8]
Lloh12:
	adrp	x9, _TX_BUFFER_INFO_FLAG_ACTIVE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _TX_BUFFER_INFO_FLAG_ACTIVE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	ldr	w10, [x8, #4]
	orr	w9, w10, w9
	str	w9, [x8, #4]
Lloh15:
	adrp	x10, _TX_BUFFER_INFO_FLAG_SKB_FRAGMENT@GOTPAGE
Lloh16:
	ldr	x10, [x10, _TX_BUFFER_INFO_FLAG_SKB_FRAGMENT@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh18:
	adrp	x10, _TX_DESC_DATA0_BUF_LENGTH_MASK_@GOTPAGE
Lloh19:
	ldr	x10, [x10, _TX_DESC_DATA0_BUF_LENGTH_MASK_@GOTPAGEOFF]
	str	w9, [x8, #4]
Lloh20:
	ldr	w8, [x10]
	and	w8, w8, w20
Lloh21:
	adrp	x9, _TX_DESC_DATA0_DTYPE_DATA_@GOTPAGE
Lloh22:
	ldr	x9, [x9, _TX_DESC_DATA0_DTYPE_DATA_@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh24:
	adrp	x9, _TX_DESC_DATA0_FCS_@GOTPAGE
Lloh25:
	ldr	x9, [x9, _TX_DESC_DATA0_FCS_@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #8]
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_TX_FRAME_FLAG_IN_PROGRESS,4,2  ; @TX_FRAME_FLAG_IN_PROGRESS
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_TX_DESC_DATA3_FRAME_LENGTH_MSS_MASK_,4,2 ; @TX_DESC_DATA3_FRAME_LENGTH_MSS_MASK_
	.comm	_TX_BUFFER_INFO_FLAG_ACTIVE,4,2 ; @TX_BUFFER_INFO_FLAG_ACTIVE
	.comm	_TX_BUFFER_INFO_FLAG_SKB_FRAGMENT,4,2 ; @TX_BUFFER_INFO_FLAG_SKB_FRAGMENT
	.comm	_TX_DESC_DATA0_BUF_LENGTH_MASK_,4,2 ; @TX_DESC_DATA0_BUF_LENGTH_MASK_
	.comm	_TX_DESC_DATA0_DTYPE_DATA_,4,2  ; @TX_DESC_DATA0_DTYPE_DATA_
	.comm	_TX_DESC_DATA0_FCS_,4,2         ; @TX_DESC_DATA0_FCS_
	.no_dead_strip	_lan743x_tx_frame_add_fragment
.subsections_via_symbols
