	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dwmac4_rd_prepare_tso_tx_desc
_dwmac4_rd_prepare_tso_tx_desc:         ## @dwmac4_rd_prepare_tso_tx_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r15d
	movl	%edx, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r13
	movl	(%rdi), %edi
	callq	_le32_to_cpu
	movl	%eax, %r14d
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movq	_TDES2_BUFFER1_SIZE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_cpu_to_le32
	orl	%eax, 4(%r13)
LBB0_2:
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.3:
	movq	_TDES2_BUFFER2_SIZE_MASK_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r15d
	movq	_TDES2_BUFFER2_SIZE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	movl	%r15d, %edi
	callq	_cpu_to_le32
	orl	%eax, 4(%r13)
LBB0_4:
	movq	_TDES3_FIRST_DESCRIPTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%r12d, %r12d
	je	LBB0_6
## %bb.5:
	movl	24(%rbp), %eax
	movl	16(%rbp), %edx
	movq	_TDES3_HDR_LEN_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movq	_TDES3_TCP_SEGMENTATION_ENABLE@GOTPCREL(%rip), %rcx
	movq	_TDES3_SLOT_NUMBER_MASK@GOTPCREL(%rip), %rsi
	andl	(%rsi), %edx
	movq	_TDES3_TCP_PKT_PAYLOAD_MASK@GOTPCREL(%rip), %rsi
	andl	(%rsi), %eax
	orl	%r14d, %ebx
	orl	(%rcx), %ebx
	orl	%edx, %ebx
	orl	%eax, %ebx
	jmp	LBB0_7
LBB0_6:
	notl	%ebx
	andl	%r14d, %ebx
LBB0_7:
	movq	_TDES3_LAST_DESCRIPTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_TDES3_OWN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	testl	%r12d, %r12d
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	je	LBB0_10
## %bb.8:
	testl	%r12d, %r12d
	je	LBB0_10
## %bb.9:
	xorl	%eax, %eax
	callq	_dma_wmb
LBB0_10:
	movl	%r14d, %eax
	notl	%eax
	andl	%ebx, %eax
	orl	%ebx, %r14d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	cmovel	%eax, %r14d
	testl	%r12d, %r12d
	cmovel	%r12d, %r15d
	orl	%r14d, %r15d
	movl	%r15d, %edi
	callq	_cpu_to_le32
	movl	%eax, (%r13)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TDES2_BUFFER1_SIZE_MASK,4,2    ## @TDES2_BUFFER1_SIZE_MASK
	.comm	_TDES2_BUFFER2_SIZE_MASK_SHIFT,4,2 ## @TDES2_BUFFER2_SIZE_MASK_SHIFT
	.comm	_TDES2_BUFFER2_SIZE_MASK,4,2    ## @TDES2_BUFFER2_SIZE_MASK
	.comm	_TDES3_FIRST_DESCRIPTOR,4,2     ## @TDES3_FIRST_DESCRIPTOR
	.comm	_TDES3_TCP_SEGMENTATION_ENABLE,4,2 ## @TDES3_TCP_SEGMENTATION_ENABLE
	.comm	_TDES3_HDR_LEN_SHIFT,4,2        ## @TDES3_HDR_LEN_SHIFT
	.comm	_TDES3_SLOT_NUMBER_MASK,4,2     ## @TDES3_SLOT_NUMBER_MASK
	.comm	_TDES3_TCP_PKT_PAYLOAD_MASK,4,2 ## @TDES3_TCP_PKT_PAYLOAD_MASK
	.comm	_TDES3_LAST_DESCRIPTOR,4,2      ## @TDES3_LAST_DESCRIPTOR
	.comm	_TDES3_OWN,4,2                  ## @TDES3_OWN
	.no_dead_strip	_dwmac4_rd_prepare_tso_tx_desc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dwmac4_rd_prepare_tso_tx_desc
_dwmac4_rd_prepare_tso_tx_desc:         ; @dwmac4_rd_prepare_tso_tx_desc
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x7
	mov	x24, x6
	mov	x21, x5
	mov	x20, x4
	mov	x26, x3
	mov	x27, x2
	mov	x22, x1
	mov	x19, x0
	ldr	w0, [x0]
	bl	_le32_to_cpu
	mov	x25, x0
	cbz	w27, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _TDES2_BUFFER1_SIZE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TDES2_BUFFER1_SIZE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w0, w8, w27
	bl	_cpu_to_le32
	ldr	w8, [x19, #4]
	orr	w8, w8, w0
	str	w8, [x19, #4]
LBB0_2:
	cbz	w26, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _TDES2_BUFFER2_SIZE_MASK_SHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TDES2_BUFFER2_SIZE_MASK_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	w8, w26, w8
Lloh6:
	adrp	x9, _TDES2_BUFFER2_SIZE_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TDES2_BUFFER2_SIZE_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w0, w8, w9
	bl	_cpu_to_le32
	ldr	w8, [x19, #4]
	orr	w8, w8, w0
	str	w8, [x19, #4]
LBB0_4:
Lloh9:
	adrp	x8, _TDES3_FIRST_DESCRIPTOR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TDES3_FIRST_DESCRIPTOR@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cbz	w22, LBB0_6
; %bb.5:
Lloh12:
	adrp	x9, _TDES3_TCP_SEGMENTATION_ENABLE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _TDES3_TCP_SEGMENTATION_ENABLE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _TDES3_HDR_LEN_SHIFT@GOTPAGE
Lloh16:
	ldr	x10, [x10, _TDES3_HDR_LEN_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	lsl	w10, w24, w10
Lloh18:
	adrp	x11, _TDES3_SLOT_NUMBER_MASK@GOTPAGE
Lloh19:
	ldr	x11, [x11, _TDES3_SLOT_NUMBER_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	and	w10, w10, w11
Lloh21:
	adrp	x11, _TDES3_TCP_PKT_PAYLOAD_MASK@GOTPAGE
Lloh22:
	ldr	x11, [x11, _TDES3_TCP_PKT_PAYLOAD_MASK@GOTPAGEOFF]
Lloh23:
	ldr	w11, [x11]
	and	w11, w11, w23
	orr	w8, w8, w25
	orr	w8, w8, w9
	orr	w8, w8, w10
	orr	w23, w8, w11
	b	LBB0_7
LBB0_6:
	bic	w23, w25, w8
LBB0_7:
Lloh24:
	adrp	x8, _TDES3_LAST_DESCRIPTOR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _TDES3_LAST_DESCRIPTOR@GOTPAGEOFF]
Lloh26:
	ldr	w25, [x8]
Lloh27:
	adrp	x8, _TDES3_OWN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _TDES3_OWN@GOTPAGEOFF]
Lloh29:
	ldr	w24, [x8]
	cbz	w22, LBB0_10
; %bb.8:
	cbz	w20, LBB0_10
; %bb.9:
	bl	_dma_wmb
LBB0_10:
	bic	w8, w23, w25
	orr	w9, w25, w23
	cmp	w21, #0
	csel	w8, w8, w9, eq
	cmp	w20, #0
	csel	w9, w24, wzr, ne
	orr	w0, w9, w8
	bl	_cpu_to_le32
	str	w0, [x19]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_TDES2_BUFFER1_SIZE_MASK,4,2    ; @TDES2_BUFFER1_SIZE_MASK
	.comm	_TDES2_BUFFER2_SIZE_MASK_SHIFT,4,2 ; @TDES2_BUFFER2_SIZE_MASK_SHIFT
	.comm	_TDES2_BUFFER2_SIZE_MASK,4,2    ; @TDES2_BUFFER2_SIZE_MASK
	.comm	_TDES3_FIRST_DESCRIPTOR,4,2     ; @TDES3_FIRST_DESCRIPTOR
	.comm	_TDES3_TCP_SEGMENTATION_ENABLE,4,2 ; @TDES3_TCP_SEGMENTATION_ENABLE
	.comm	_TDES3_HDR_LEN_SHIFT,4,2        ; @TDES3_HDR_LEN_SHIFT
	.comm	_TDES3_SLOT_NUMBER_MASK,4,2     ; @TDES3_SLOT_NUMBER_MASK
	.comm	_TDES3_TCP_PKT_PAYLOAD_MASK,4,2 ; @TDES3_TCP_PKT_PAYLOAD_MASK
	.comm	_TDES3_LAST_DESCRIPTOR,4,2      ; @TDES3_LAST_DESCRIPTOR
	.comm	_TDES3_OWN,4,2                  ; @TDES3_OWN
	.no_dead_strip	_dwmac4_rd_prepare_tso_tx_desc
.subsections_via_symbols
