	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2800usb_write_tx_desc
_rt2800usb_write_tx_desc:               ## @rt2800usb_write_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	8(%rdi), %rdi
	callq	_get_skb_frame_desc
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	8(%r13), %rax
	movq	8(%rax), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_rt2x00_desc_read
	movl	%eax, -44(%rbp)
	movq	_TXINFO_W0_USB_DMA_TX_PKT_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	8(%r13), %rax
	movl	(%rax), %edi
	movl	$4, %esi
	callq	_roundup
	movq	_TXINFO_DESC_SIZE@GOTPCREL(%rip), %rcx
	subl	(%rcx), %eax
	leaq	-44(%rbp), %r14
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_rt2x00_set_field32
	movq	_TXINFO_W0_WIV@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ENTRY_TXD_ENCRYPT_IV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_test_bit
	xorl	%edx, %edx
	testl	%eax, %eax
	sete	%dl
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_rt2x00_set_field32
	movq	_TXINFO_W0_QSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$2, %edx
	callq	_rt2x00_set_field32
	movq	_TXINFO_W0_SW_USE_LAST_ROUND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field32
	movq	_TXINFO_W0_USB_DMA_NEXT_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field32
	movq	_TXINFO_W0_USB_DMA_TX_BURST@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ENTRY_TXD_BURST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_test_bit
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_rt2x00_set_field32
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_rt2x00_desc_write
	movq	_SKBDESC_DESC_IN_SKB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	orl	%eax, 16(%rcx)
	movq	%r15, 8(%rcx)
	movq	(%r13), %rax
	movl	(%rax), %eax
	movq	_TXINFO_DESC_SIZE@GOTPCREL(%rip), %rdx
	addl	(%rdx), %eax
	movl	%eax, (%rcx)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TXINFO_W0_USB_DMA_TX_PKT_LEN,4,2 ## @TXINFO_W0_USB_DMA_TX_PKT_LEN
	.comm	_TXINFO_DESC_SIZE,4,2           ## @TXINFO_DESC_SIZE
	.comm	_TXINFO_W0_WIV,4,2              ## @TXINFO_W0_WIV
	.comm	_ENTRY_TXD_ENCRYPT_IV,4,2       ## @ENTRY_TXD_ENCRYPT_IV
	.comm	_TXINFO_W0_QSEL,4,2             ## @TXINFO_W0_QSEL
	.comm	_TXINFO_W0_SW_USE_LAST_ROUND,4,2 ## @TXINFO_W0_SW_USE_LAST_ROUND
	.comm	_TXINFO_W0_USB_DMA_NEXT_VALID,4,2 ## @TXINFO_W0_USB_DMA_NEXT_VALID
	.comm	_TXINFO_W0_USB_DMA_TX_BURST,4,2 ## @TXINFO_W0_USB_DMA_TX_BURST
	.comm	_ENTRY_TXD_BURST,4,2            ## @ENTRY_TXD_BURST
	.comm	_SKBDESC_DESC_IN_SKB,4,2        ## @SKBDESC_DESC_IN_SKB
	.no_dead_strip	_rt2800usb_write_tx_desc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2800usb_write_tx_desc
_rt2800usb_write_tx_desc:               ; @rt2800usb_write_tx_desc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x22, x1
	mov	x19, x0
	ldr	x0, [x0, #8]
	bl	_get_skb_frame_desc
	mov	x20, x0
	ldr	x8, [x19, #8]
	ldr	x21, [x8, #8]
	mov	x0, x21
	mov	w1, #0
	bl	_rt2x00_desc_read
	str	w0, [sp, #12]
Lloh0:
	adrp	x8, _TXINFO_W0_USB_DMA_TX_PKT_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TXINFO_W0_USB_DMA_TX_PKT_LEN@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	mov	w1, #4
	bl	_roundup
Lloh3:
	adrp	x24, _TXINFO_DESC_SIZE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _TXINFO_DESC_SIZE@GOTPAGEOFF]
	ldr	w8, [x24]
	sub	w2, w0, w8
	add	x0, sp, #12
	mov	x1, x23
	bl	_rt2x00_set_field32
Lloh5:
	adrp	x8, _TXINFO_W0_WIV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TXINFO_W0_WIV@GOTPAGEOFF]
Lloh7:
	ldr	w23, [x8]
Lloh8:
	adrp	x8, _ENTRY_TXD_ENCRYPT_IV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENTRY_TXD_ENCRYPT_IV@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_test_bit
	cmp	w0, #0
	cset	w2, eq
	add	x0, sp, #12
	mov	x1, x23
	bl	_rt2x00_set_field32
Lloh11:
	adrp	x8, _TXINFO_W0_QSEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TXINFO_W0_QSEL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #2
	bl	_rt2x00_set_field32
Lloh14:
	adrp	x8, _TXINFO_W0_SW_USE_LAST_ROUND@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TXINFO_W0_SW_USE_LAST_ROUND@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field32
Lloh17:
	adrp	x8, _TXINFO_W0_USB_DMA_NEXT_VALID@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TXINFO_W0_USB_DMA_NEXT_VALID@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field32
Lloh20:
	adrp	x8, _TXINFO_W0_USB_DMA_TX_BURST@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TXINFO_W0_USB_DMA_TX_BURST@GOTPAGEOFF]
Lloh22:
	ldr	w23, [x8]
Lloh23:
	adrp	x8, _ENTRY_TXD_BURST@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENTRY_TXD_BURST@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_test_bit
	mov	x2, x0
	add	x0, sp, #12
	mov	x1, x23
	bl	_rt2x00_set_field32
	ldr	w2, [sp, #12]
	mov	x0, x21
	mov	w1, #0
	bl	_rt2x00_desc_write
Lloh26:
	adrp	x8, _SKBDESC_DESC_IN_SKB@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SKBDESC_DESC_IN_SKB@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	ldr	w9, [x20, #16]
	orr	w8, w9, w8
	str	w8, [x20, #16]
	str	x21, [x20, #8]
	ldr	w8, [x24]
	ldr	x9, [x19]
	ldr	w9, [x9]
	add	w8, w9, w8
	str	w8, [x20]
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TXINFO_W0_USB_DMA_TX_PKT_LEN,4,2 ; @TXINFO_W0_USB_DMA_TX_PKT_LEN
	.comm	_TXINFO_DESC_SIZE,4,2           ; @TXINFO_DESC_SIZE
	.comm	_TXINFO_W0_WIV,4,2              ; @TXINFO_W0_WIV
	.comm	_ENTRY_TXD_ENCRYPT_IV,4,2       ; @ENTRY_TXD_ENCRYPT_IV
	.comm	_TXINFO_W0_QSEL,4,2             ; @TXINFO_W0_QSEL
	.comm	_TXINFO_W0_SW_USE_LAST_ROUND,4,2 ; @TXINFO_W0_SW_USE_LAST_ROUND
	.comm	_TXINFO_W0_USB_DMA_NEXT_VALID,4,2 ; @TXINFO_W0_USB_DMA_NEXT_VALID
	.comm	_TXINFO_W0_USB_DMA_TX_BURST,4,2 ; @TXINFO_W0_USB_DMA_TX_BURST
	.comm	_ENTRY_TXD_BURST,4,2            ; @ENTRY_TXD_BURST
	.comm	_SKBDESC_DESC_IN_SKB,4,2        ; @SKBDESC_DESC_IN_SKB
	.no_dead_strip	_rt2800usb_write_tx_desc
.subsections_via_symbols
