	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function emac_tx_fill_tpd
_emac_tx_fill_tpd:                      ## @emac_tx_fill_tpd
	.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
	movq	%rcx, %r14
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	%rdx, %rdi
	callq	_skb_shinfo
	movl	(%rax), %eax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movl	(%r15), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_skb_headlen
	movl	%eax, %ebx
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_TPD_LSO
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	%ebx, -108(%rbp)                ## 4-byte Spill
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_skb_transport_offset
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_tcp_hdrlen
	movl	%eax, %r13d
	addl	%r14d, %r13d
	movl	(%r15), %esi
	movq	%r15, %rdi
	callq	_GET_TPD_BUFFER
	movq	%rax, %r14
	movl	%r13d, (%rax)
	movq	(%r12), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%rbx), %rdi
	callq	_virt_to_page
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	(%rbx), %rdi
	callq	_offset_in_page
	movl	(%r14), %ecx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_dma_map_page
	movq	%rax, 8(%r14)
	movq	(%r12), %rcx
	movl	(%rcx), %edi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r15)
	jmp	LBB0_4
LBB0_1:
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	subl	%r13d, %ebx
	jbe	LBB0_7
LBB0_8:
	movl	(%r15), %esi
	movq	%r15, %rdi
	movl	%r13d, %r14d
	callq	_GET_TPD_BUFFER
	movq	%rax, %r13
	movl	%ebx, (%rax)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r14d, %r14d
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdi
	addq	%r14, %rdi
	callq	_virt_to_page
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	addq	(%rbx), %r14
	movq	%r14, %rdi
	callq	_offset_in_page
	movl	(%r13), %ecx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_dma_map_page
	movq	%rax, 8(%r13)
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, %r14
	movq	(%rcx), %rcx
	movl	(%rcx), %edi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testl	%eax, %eax
	jne	LBB0_14
## %bb.9:
	movq	8(%r13), %rdi
	callq	_lower_32_bits
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_TPD_BUFFER_ADDR_L_SET
	movq	8(%r13), %rdi
	callq	_upper_32_bits
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_TPD_BUFFER_ADDR_H_SET
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	(%r13), %esi
	movq	%rbx, %rdi
	movq	%rbx, %r15
	callq	_TPD_BUF_LEN_SET
	movq	%r14, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	%rsi, %rbx
	movq	%r15, %rdx
	callq	_emac_tx_tpd_create
	incl	%r12d
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_10
LBB0_5:
	movq	8(%r14), %rdi
	callq	_lower_32_bits
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_TPD_BUFFER_ADDR_L_SET
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	callq	_upper_32_bits
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_TPD_BUFFER_ADDR_H_SET
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_TPD_BUF_LEN_SET
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	callq	_emac_tx_tpd_create
	movl	$1, %r12d
	movl	-108(%rbp), %ebx                ## 4-byte Reload
	subl	%r13d, %ebx
	ja	LBB0_8
LBB0_7:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rbx
LBB0_10:
	cmpq	$0, -104(%rbp)                  ## 8-byte Folded Reload
	movq	%rbx, %r12
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_19
## %bb.11:
	shlq	$2, -104(%rbp)                  ## 8-byte Folded Spill
	xorl	%r13d, %r13d
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_skb_shinfo
	movq	8(%rax), %r15
	addq	%r13, %r15
	movl	(%r12), %esi
	movq	%r12, %rdi
	callq	_GET_TPD_BUFFER
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_skb_frag_size
	movl	%eax, (%rbx)
	movq	(%r14), %rcx
	movl	(%rcx), %edi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	%r15, %rsi
	xorl	%edx, %edx
	movl	%eax, %ecx
	callq	_skb_frag_dma_map
	movq	%rax, 8(%rbx)
	movq	(%r14), %rcx
	movl	(%rcx), %edi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testl	%eax, %eax
	jne	LBB0_13
## %bb.18:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	8(%rbx), %rdi
	callq	_lower_32_bits
	movq	%rbx, %r15
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_TPD_BUFFER_ADDR_L_SET
	movq	8(%r15), %rdi
	callq	_upper_32_bits
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_TPD_BUFFER_ADDR_H_SET
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_TPD_BUF_LEN_SET
	movq	%r14, %rdi
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_emac_tx_tpd_create
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	addq	$4, %r13
	cmpq	%r13, -104(%rbp)                ## 8-byte Folded Reload
	jne	LBB0_12
LBB0_19:
	xorl	%eax, %eax
	callq	_wmb
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_emac_tx_tpd_mark_last
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%r15)
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movl	-44(%rbp), %r12d                ## 4-byte Reload
LBB0_14:
	movl	-68(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, (%r15)
	testl	%r12d, %r12d
	jne	LBB0_15
LBB0_4:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_kfree_skb                  ## TAILCALL
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=1
	movl	%eax, %r13d
	decl	%r12d
	je	LBB0_4
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_GET_TPD_BUFFER
	movq	%rax, %rbx
	movq	(%r14), %rax
	movl	(%rax), %edi
	movq	8(%rbx), %rsi
	movl	(%rbx), %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_unmap_page
	movq	$0, 8(%rbx)
	movl	$0, (%rbx)
	incl	%r13d
	xorl	%eax, %eax
	cmpl	4(%r15), %r13d
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	%r13d, %eax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.no_dead_strip	_emac_tx_fill_tpd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function emac_tx_fill_tpd
_emac_tx_fill_tpd:                      ; @emac_tx_fill_tpd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x23, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x0, x2
	bl	_skb_shinfo
	ldr	w24, [x0]
	ldr	w22, [x20]
	mov	x0, x19
	bl	_skb_headlen
	mov	x25, x0
	mov	x0, x23
	bl	_TPD_LSO
	str	x24, [sp, #8]                   ; 8-byte Folded Spill
	cbz	x0, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_skb_transport_offset
	mov	x24, x0
	mov	x0, x19
	bl	_tcp_hdrlen
	add	w28, w0, w24
	ldr	w1, [x20]
	mov	x0, x20
	bl	_GET_TPD_BUFFER
	mov	x24, x0
	str	w28, [x0]
	ldr	x8, [x21]
	ldr	w26, [x8]
	ldr	x0, [x19]
	bl	_virt_to_page
	mov	x27, x0
	ldr	x0, [x19]
	bl	_offset_in_page
	mov	x2, x0
	ldr	w3, [x24]
Lloh0:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	mov	x0, x26
	mov	x1, x27
	bl	_dma_map_page
	mov	x1, x0
	str	x0, [x24, #8]
	ldr	x8, [x21]
	ldr	w0, [x8]
	bl	_dma_mapping_error
	cbz	w0, LBB0_5
; %bb.2:
	str	w22, [x20]
	b	LBB0_10
LBB0_3:
	mov	x24, #0
	mov	w28, #0
	mov	w27, #0
	subs	w25, w25, w28
	b.hi	LBB0_6
LBB0_4:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	cbnz	w8, LBB0_12
	b	LBB0_15
LBB0_5:
	ldr	x0, [x24, #8]
	bl	_lower_32_bits
	mov	x1, x0
	mov	x0, x23
	bl	_TPD_BUFFER_ADDR_L_SET
	ldr	x0, [x24, #8]
	bl	_upper_32_bits
	mov	x1, x0
	mov	x0, x23
	bl	_TPD_BUFFER_ADDR_H_SET
	ldr	w1, [x24]
	mov	x0, x23
	bl	_TPD_BUF_LEN_SET
	mov	x0, x21
	mov	x1, x20
	mov	x2, x23
	bl	_emac_tx_tpd_create
	mov	w27, #1
	subs	w25, w25, w28
	b.ls	LBB0_4
LBB0_6:
	ldr	w1, [x20]
	mov	x0, x20
	bl	_GET_TPD_BUFFER
	mov	x24, x0
	str	w25, [x0]
	ldr	x8, [x21]
	ldr	w25, [x8]
	ldr	x8, [x19]
	mov	w28, w28
	add	x0, x8, x28
	bl	_virt_to_page
	mov	x26, x0
	ldr	x8, [x19]
	add	x0, x8, x28
	bl	_offset_in_page
	mov	x2, x0
	ldr	w3, [x24]
Lloh3:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
	mov	x0, x25
	mov	x1, x26
	bl	_dma_map_page
	mov	x1, x0
	str	x0, [x24, #8]
	ldr	x8, [x21]
	ldr	w0, [x8]
	bl	_dma_mapping_error
	cbz	w0, LBB0_11
LBB0_7:
	str	w22, [x20]
	cbz	w27, LBB0_10
; %bb.8:
Lloh6:
	adrp	x24, _DMA_TO_DEVICE@GOTPAGE
Lloh7:
	ldr	x24, [x24, _DMA_TO_DEVICE@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	sub	w27, w27, #1
	mov	x0, x20
	mov	x1, x22
	bl	_GET_TPD_BUFFER
	mov	x23, x0
	ldr	x8, [x21]
	ldr	w0, [x8]
	ldr	x1, [x23, #8]
	ldr	w2, [x23]
	ldr	w3, [x24]
	bl	_dma_unmap_page
	str	xzr, [x23, #8]
	str	wzr, [x23]
	add	w8, w22, #1
	ldr	w9, [x20, #4]
	cmp	w8, w9
	csinc	w22, wzr, w22, eq
	cbnz	w27, LBB0_9
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_dev_kfree_skb
LBB0_11:
	ldr	x0, [x24, #8]
	bl	_lower_32_bits
	mov	x1, x0
	mov	x0, x23
	bl	_TPD_BUFFER_ADDR_L_SET
	ldr	x0, [x24, #8]
	bl	_upper_32_bits
	mov	x1, x0
	mov	x0, x23
	bl	_TPD_BUFFER_ADDR_H_SET
	ldr	w1, [x24]
	mov	x0, x23
	bl	_TPD_BUF_LEN_SET
	mov	x0, x21
	mov	x1, x20
	mov	x2, x23
	bl	_emac_tx_tpd_create
	add	w27, w27, #1
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	cbz	w8, LBB0_15
LBB0_12:
	mov	x26, #0
	lsl	x28, x8, #2
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_skb_shinfo
	ldr	x8, [x0, #8]
	add	x25, x8, x26
	ldr	w1, [x20]
	mov	x0, x20
	bl	_GET_TPD_BUFFER
	mov	x24, x0
	mov	x0, x25
	bl	_skb_frag_size
	mov	x3, x0
	str	w0, [x24]
	ldr	x8, [x21]
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh10:
	ldr	w4, [x8]
	mov	x1, x25
	mov	w2, #0
	bl	_skb_frag_dma_map
	mov	x1, x0
	str	x0, [x24, #8]
	ldr	x8, [x21]
	ldr	w0, [x8]
	bl	_dma_mapping_error
	cbnz	w0, LBB0_7
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x0, [x24, #8]
	bl	_lower_32_bits
	mov	x1, x0
	mov	x0, x23
	bl	_TPD_BUFFER_ADDR_L_SET
	ldr	x0, [x24, #8]
	bl	_upper_32_bits
	mov	x1, x0
	mov	x0, x23
	bl	_TPD_BUFFER_ADDR_H_SET
	ldr	w1, [x24]
	mov	x0, x23
	bl	_TPD_BUF_LEN_SET
	mov	x0, x21
	mov	x1, x20
	mov	x2, x23
	bl	_emac_tx_tpd_create
	add	w27, w27, #1
	add	x26, x26, #4
	cmp	x28, x26
	b.ne	LBB0_13
LBB0_15:
	bl	_wmb
	mov	x0, x21
	mov	x1, x20
	bl	_emac_tx_tpd_mark_last
	str	x19, [x24, #16]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.no_dead_strip	_emac_tx_fill_tpd
.subsections_via_symbols
