	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dwmac4_rd_prepare_tx_desc
_dwmac4_rd_prepare_tx_desc:             ## @dwmac4_rd_prepare_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %ebx
	movl	%esi, %r13d
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_le32_to_cpu
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_TDES2_BUFFER1_SIZE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_cpu_to_le32
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	orl	%eax, 4(%r14)
	movq	_TDES3_PACKET_SIZE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_TDES3_FIRST_DESCRIPTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_likely
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	%rax, %rdi
	movq	_TX_CIC_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_TDES3_CHECKSUM_INSERTION_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_TDES3_LAST_DESCRIPTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TDES3_OWN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	testl	%r13d, %r13d
	je	LBB0_3
## %bb.1:
	testl	%edx, %edx
	je	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	movl	%esi, %r13d
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	callq	_dma_wmb
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
LBB0_3:
	andl	24(%rbp), %r12d
	orl	-56(%rbp), %r12d                ## 4-byte Folded Reload
	movl	%r15d, %eax
	orl	%r12d, %eax
	notl	%r15d
	andl	%r12d, %r15d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	cmovnel	%eax, %r15d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r14d
	movl	%r14d, %eax
	notl	%eax
	andl	%r15d, %eax
	orl	%r15d, %r14d
	testq	%rdi, %rdi
	cmovel	%eax, %r14d
	movl	%esi, %eax
	notl	%eax
	andl	%r14d, %eax
	orl	%esi, %r14d
	cmpl	$0, 16(%rbp)
	cmovel	%eax, %r14d
	testl	%edx, %edx
	cmovel	%edx, %ebx
	orl	%r14d, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_le32
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	addq	$40, %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	_TDES3_PACKET_SIZE_MASK,4,2     ## @TDES3_PACKET_SIZE_MASK
	.comm	_TDES3_FIRST_DESCRIPTOR,4,2     ## @TDES3_FIRST_DESCRIPTOR
	.comm	_TX_CIC_FULL,4,2                ## @TX_CIC_FULL
	.comm	_TDES3_CHECKSUM_INSERTION_SHIFT,4,2 ## @TDES3_CHECKSUM_INSERTION_SHIFT
	.comm	_TDES3_LAST_DESCRIPTOR,4,2      ## @TDES3_LAST_DESCRIPTOR
	.comm	_TDES3_OWN,4,2                  ## @TDES3_OWN
	.no_dead_strip	_dwmac4_rd_prepare_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_tx_desc
_dwmac4_rd_prepare_tx_desc:             ; @dwmac4_rd_prepare_tx_desc
	.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
	stp	w7, w6, [sp, #8]                ; 8-byte Folded Spill
	mov	x20, x5
	mov	x25, x3
	mov	x26, x2
	mov	x23, x1
	mov	x19, x0
	ldr	w0, [x0]
	bl	_le32_to_cpu
	str	w0, [sp, #4]                    ; 4-byte Folded Spill
Lloh0:
	adrp	x8, _TDES2_BUFFER1_SIZE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TDES2_BUFFER1_SIZE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w0, w8, w26
	bl	_cpu_to_le32
	ldr	w8, [x19, #4]
	orr	w8, w8, w0
	str	w8, [x19, #4]
Lloh3:
	adrp	x8, _TDES3_PACKET_SIZE_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TDES3_PACKET_SIZE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w28, [x8]
Lloh6:
	adrp	x8, _TDES3_FIRST_DESCRIPTOR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TDES3_FIRST_DESCRIPTOR@GOTPAGEOFF]
Lloh8:
	ldr	w27, [x8]
	mov	x0, x25
	bl	_likely
	mov	x25, x0
Lloh9:
	adrp	x8, _TX_CIC_FULL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TX_CIC_FULL@GOTPAGEOFF]
Lloh11:
	ldr	w22, [x8]
Lloh12:
	adrp	x8, _TDES3_CHECKSUM_INSERTION_SHIFT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TDES3_CHECKSUM_INSERTION_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w24, [x8]
Lloh15:
	adrp	x8, _TDES3_LAST_DESCRIPTOR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TDES3_LAST_DESCRIPTOR@GOTPAGEOFF]
Lloh17:
	ldr	w21, [x8]
Lloh18:
	adrp	x8, _TDES3_OWN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _TDES3_OWN@GOTPAGEOFF]
Lloh20:
	ldr	w26, [x8]
	cbz	w23, LBB0_3
; %bb.1:
	cbz	w20, LBB0_3
; %bb.2:
	bl	_dma_wmb
LBB0_3:
	ldp	w9, w8, [sp, #4]                ; 8-byte Folded Reload
	and	w8, w28, w8
	orr	w8, w8, w9
	orr	w9, w27, w8
	bic	w8, w8, w27
	cmp	w23, #0
	csel	w8, w9, w8, ne
	lsl	w9, w22, w24
	bic	w10, w8, w9
	orr	w8, w9, w8
	cmp	x25, #0
	csel	w8, w10, w8, eq
	bic	w9, w8, w21
	orr	w8, w21, w8
	ldr	w10, [sp, #12]                  ; 4-byte Folded Reload
	cmp	w10, #0
	csel	w8, w9, w8, eq
	cmp	w20, #0
	csel	w9, w26, wzr, ne
	orr	w0, w9, w8
	bl	_cpu_to_le32
	str	w0, [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
	ret
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TDES2_BUFFER1_SIZE_MASK,4,2    ; @TDES2_BUFFER1_SIZE_MASK
	.comm	_TDES3_PACKET_SIZE_MASK,4,2     ; @TDES3_PACKET_SIZE_MASK
	.comm	_TDES3_FIRST_DESCRIPTOR,4,2     ; @TDES3_FIRST_DESCRIPTOR
	.comm	_TX_CIC_FULL,4,2                ; @TX_CIC_FULL
	.comm	_TDES3_CHECKSUM_INSERTION_SHIFT,4,2 ; @TDES3_CHECKSUM_INSERTION_SHIFT
	.comm	_TDES3_LAST_DESCRIPTOR,4,2      ; @TDES3_LAST_DESCRIPTOR
	.comm	_TDES3_OWN,4,2                  ; @TDES3_OWN
	.no_dead_strip	_dwmac4_rd_prepare_tx_desc
.subsections_via_symbols
