	.file	"extr_rt2800lib.c_rt2800_write_tx_data.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	rt2800_write_tx_data
	.type	rt2800_write_tx_data, @function
rt2800_write_tx_data:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rsi
	lea	r14, 36[rbx]
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	r12, 4[rsp]
	call	rt2800_drv_get_txwi@PLT
	mov	rdx, r12
	xor	esi, esi
	mov	rdi, rax
	mov	rbp, rax
	call	rt2x00_desc_read@PLT
	mov	edi, DWORD PTR ENTRY_TXD_MORE_FRAG[rip]
	mov	rsi, r14
	call	test_bit@PLT
	mov	esi, DWORD PTR TXWI_W0_FRAG[rip]
	mov	rdi, r12
	mov	edx, eax
	call	rt2x00_set_field32@PLT
	mov	edi, DWORD PTR ENTRY_TXD_HT_MIMO_PS[rip]
	mov	rsi, r14
	call	test_bit@PLT
	mov	esi, DWORD PTR TXWI_W0_MIMO_PS[rip]
	mov	rdi, r12
	mov	edx, eax
	call	rt2x00_set_field32@PLT
	mov	esi, DWORD PTR TXWI_W0_CF_ACK[rip]
	xor	edx, edx
	mov	rdi, r12
	call	rt2x00_set_field32@PLT
	mov	edi, DWORD PTR ENTRY_TXD_REQ_TIMESTAMP[rip]
	mov	rsi, r14
	call	test_bit@PLT
	mov	esi, DWORD PTR TXWI_W0_TS[rip]
	mov	rdi, r12
	mov	edx, eax
	call	rt2x00_set_field32@PLT
	mov	edi, DWORD PTR ENTRY_TXD_HT_AMPDU[rip]
	mov	rsi, r14
	call	test_bit@PLT
	mov	esi, DWORD PTR TXWI_W0_AMPDU[rip]
	mov	rdi, r12
	mov	edx, eax
	call	rt2x00_set_field32@PLT
	mov	edx, DWORD PTR 12[rbx]
	mov	esi, DWORD PTR TXWI_W0_MPDU_DENSITY[rip]
	mov	rdi, r12
	call	rt2x00_set_field32@PLT
	mov	edx, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR TXWI_W0_TX_OP[rip]
	mov	rdi, r12
	call	rt2x00_set_field32@PLT
	mov	edx, DWORD PTR 20[rbx]
	mov	esi, DWORD PTR TXWI_W0_MCS[rip]
	mov	rdi, r12
	call	rt2x00_set_field32@PLT
	mov	edi, DWORD PTR ENTRY_TXD_HT_BW_40[rip]
	mov	rsi, r14
	call	test_bit@PLT
	mov	esi, DWORD PTR TXWI_W0_BW[rip]
	mov	rdi, r12
	mov	edx, eax
	call	rt2x00_set_field32@PLT
	mov	edi, DWORD PTR ENTRY_TXD_HT_SHORT_GI[rip]
	mov	rsi, r14
	call	test_bit@PLT
	mov	esi, DWORD PTR TXWI_W0_SHORT_GI[rip]
	mov	rdi, r12
	mov	edx, eax
	call	rt2x00_set_field32@PLT
	mov	edx, DWORD PTR 24[rbx]
	mov	esi, DWORD PTR TXWI_W0_STBC[rip]
	mov	rdi, r12
	call	rt2x00_set_field32@PLT
	mov	edx, DWORD PTR [rbx]
	mov	esi, DWORD PTR TXWI_W0_PHYMODE[rip]
	mov	rdi, r12
	call	rt2x00_set_field32@PLT
	mov	edx, DWORD PTR 4[rsp]
	xor	esi, esi
	mov	rdi, rbp
	call	rt2x00_desc_write@PLT
	mov	rdx, r12
	mov	esi, 1
	mov	rdi, rbp
	call	rt2x00_desc_read@PLT
	mov	edi, DWORD PTR ENTRY_TXD_ACK[rip]
	mov	rsi, r14
	call	test_bit@PLT
	mov	esi, DWORD PTR TXWI_W1_ACK[rip]
	mov	rdi, r12
	mov	edx, eax
	call	rt2x00_set_field32@PLT
	mov	edi, DWORD PTR ENTRY_TXD_GENERATE_SEQ[rip]
	mov	rsi, r14
	call	test_bit@PLT
	mov	esi, DWORD PTR TXWI_W1_NSEQ[rip]
	mov	rdi, r12
	mov	edx, eax
	call	rt2x00_set_field32@PLT
	mov	esi, DWORD PTR TXWI_W1_BW_WIN_SIZE[rip]
	mov	edx, DWORD PTR 28[rbx]
	mov	rdi, r12
	call	rt2x00_set_field32@PLT
	mov	edi, DWORD PTR ENTRY_TXD_ENCRYPT[rip]
	mov	rsi, r14
	call	test_bit@PLT
	test	eax, eax
	je	.L2
	mov	edx, DWORD PTR 4[rbx]
.L3:
	mov	esi, DWORD PTR TXWI_W1_WIRELESS_CLI_ID[rip]
	mov	rdi, r12
	call	rt2x00_set_field32@PLT
	mov	edx, DWORD PTR 8[rbx]
	mov	esi, DWORD PTR TXWI_W1_MPDU_TOTAL_BYTE_COUNT[rip]
	mov	rdi, r12
	call	rt2x00_set_field32@PLT
	mov	rax, QWORD PTR 8[r13]
	mov	esi, DWORD PTR TXWI_W1_PACKETID_QUEUE[rip]
	mov	rdi, r12
	mov	edx, DWORD PTR [rax]
	call	rt2x00_set_field32@PLT
	movsx	rax, DWORD PTR 0[r13]
	mov	esi, DWORD PTR TXWI_W1_PACKETID_ENTRY[rip]
	mov	rdi, r12
	mov	rdx, rax
	imul	rax, rax, 1431655766
	mov	ecx, edx
	sar	ecx, 31
	shr	rax, 32
	sub	eax, ecx
	lea	eax, [rax+rax*2]
	sub	edx, eax
	add	edx, 1
	call	rt2x00_set_field32@PLT
	mov	edx, DWORD PTR 4[rsp]
	mov	esi, 1
	mov	rdi, rbp
	call	rt2x00_desc_write@PLT
	mov	rax, QWORD PTR 8[r13]
	movsx	rax, DWORD PTR 4[rax]
	cmp	rax, 11
	jbe	.L1
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L5:
	lea	esi, 2[rbx]
	xor	edx, edx
	mov	rdi, rbp
	call	_rt2x00_desc_write@PLT
	mov	rdx, QWORD PTR 8[r13]
	mov	rax, rbx
	add	rbx, 1
	add	rax, 3
	movsx	rdx, DWORD PTR 4[rdx]
	shr	rdx, 2
	cmp	rdx, rax
	ja	.L5
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L10
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edx, DWORD PTR 32[rbx]
	jmp	.L3
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	rt2800_write_tx_data, .-rt2800_write_tx_data
	.comm	TXWI_W1_WIRELESS_CLI_ID,4,4
	.comm	TXWI_W1_PACKETID_QUEUE,4,4
	.comm	TXWI_W1_PACKETID_ENTRY,4,4
	.comm	TXWI_W1_NSEQ,4,4
	.comm	TXWI_W1_MPDU_TOTAL_BYTE_COUNT,4,4
	.comm	TXWI_W1_BW_WIN_SIZE,4,4
	.comm	TXWI_W1_ACK,4,4
	.comm	TXWI_W0_TX_OP,4,4
	.comm	TXWI_W0_TS,4,4
	.comm	TXWI_W0_STBC,4,4
	.comm	TXWI_W0_SHORT_GI,4,4
	.comm	TXWI_W0_PHYMODE,4,4
	.comm	TXWI_W0_MPDU_DENSITY,4,4
	.comm	TXWI_W0_MIMO_PS,4,4
	.comm	TXWI_W0_MCS,4,4
	.comm	TXWI_W0_FRAG,4,4
	.comm	TXWI_W0_CF_ACK,4,4
	.comm	TXWI_W0_BW,4,4
	.comm	TXWI_W0_AMPDU,4,4
	.comm	ENTRY_TXD_REQ_TIMESTAMP,4,4
	.comm	ENTRY_TXD_MORE_FRAG,4,4
	.comm	ENTRY_TXD_HT_SHORT_GI,4,4
	.comm	ENTRY_TXD_HT_MIMO_PS,4,4
	.comm	ENTRY_TXD_HT_BW_40,4,4
	.comm	ENTRY_TXD_HT_AMPDU,4,4
	.comm	ENTRY_TXD_GENERATE_SEQ,4,4
	.comm	ENTRY_TXD_ENCRYPT,4,4
	.comm	ENTRY_TXD_ACK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_rt2800lib.c_rt2800_write_tx_data.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	rt2800_write_tx_data
	.syntax unified
	.arm
	.fpu softvfp
	.type	rt2800_write_tx_data, %function
rt2800_write_tx_data:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L11
	sub	sp, sp, #8
	mov	r4, r1
	mov	r6, r0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	rt2800_drv_get_txwi
	mov	r2, sp
	mov	r1, #0
	mov	r5, r0
	bl	rt2x00_desc_read
	ldr	r3, .L11+4
	add	r7, r4, #36
	ldr	r2, .L11+8
	mov	r1, r7
	ldr	r0, [r3]
	ldr	r8, [r2]
	bl	test_bit
	mov	r1, r8
	mov	r2, r0
	mov	r0, sp
	bl	rt2x00_set_field32
	ldr	r3, .L11+12
	ldr	r2, .L11+16
	mov	r1, r7
	ldr	r0, [r3]
	ldr	r8, [r2]
	bl	test_bit
	mov	r1, r8
	mov	r2, r0
	mov	r0, sp
	bl	rt2x00_set_field32
	ldr	r3, .L11+20
	mov	r2, #0
	ldr	r1, [r3]
	mov	r0, sp
	bl	rt2x00_set_field32
	ldr	r3, .L11+24
	ldr	r2, .L11+28
	mov	r1, r7
	ldr	r0, [r3]
	ldr	r8, [r2]
	bl	test_bit
	mov	r1, r8
	mov	r2, r0
	mov	r0, sp
	bl	rt2x00_set_field32
	ldr	r3, .L11+32
	ldr	r2, .L11+36
	mov	r1, r7
	ldr	r0, [r3]
	ldr	r8, [r2]
	bl	test_bit
	mov	r1, r8
	mov	r2, r0
	mov	r0, sp
	bl	rt2x00_set_field32
	ldr	r3, .L11+40
	ldr	r2, [r4, #12]
	ldr	r1, [r3]
	mov	r0, sp
	bl	rt2x00_set_field32
	ldr	r3, .L11+44
	ldr	r2, [r4, #16]
	ldr	r1, [r3]
	mov	r0, sp
	bl	rt2x00_set_field32
	ldr	r3, .L11+48
	ldr	r2, [r4, #20]
	ldr	r1, [r3]
	mov	r0, sp
	bl	rt2x00_set_field32
	ldr	r3, .L11+52
	ldr	r2, .L11+56
	mov	r1, r7
	ldr	r0, [r3]
	ldr	r8, [r2]
	bl	test_bit
	mov	r1, r8
	mov	r2, r0
	mov	r0, sp
	bl	rt2x00_set_field32
	ldr	r3, .L11+60
	ldr	r2, .L11+64
	mov	r1, r7
	ldr	r0, [r3]
	ldr	r8, [r2]
	bl	test_bit
	mov	r1, r8
	mov	r2, r0
	mov	r0, sp
	bl	rt2x00_set_field32
	ldr	r3, .L11+68
	ldr	r2, [r4, #24]
	ldr	r1, [r3]
	mov	r0, sp
	bl	rt2x00_set_field32
	ldr	r3, .L11+72
	ldr	r2, [r4]
	ldr	r1, [r3]
	mov	r0, sp
	bl	rt2x00_set_field32
	mov	r1, #0
	ldr	r2, [sp]
	mov	r0, r5
	bl	rt2x00_desc_write
	mov	r2, sp
	mov	r1, #1
	mov	r0, r5
	bl	rt2x00_desc_read
	ldr	r3, .L11+76
	ldr	r2, .L11+80
	mov	r1, r7
	ldr	r0, [r3]
	ldr	r8, [r2]
	bl	test_bit
	mov	r1, r8
	mov	r2, r0
	mov	r0, sp
	bl	rt2x00_set_field32
	ldr	r3, .L11+84
	ldr	r2, .L11+88
	mov	r1, r7
	ldr	r0, [r3]
	ldr	r8, [r2]
	bl	test_bit
	mov	r1, r8
	mov	r2, r0
	mov	r0, sp
	bl	rt2x00_set_field32
	ldr	r3, .L11+92
	ldr	r2, [r4, #28]
	ldr	r1, [r3]
	mov	r0, sp
	bl	rt2x00_set_field32
	ldr	r2, .L11+96
	ldr	r3, .L11+100
	ldr	r0, [r2]
	mov	r1, r7
	ldr	r7, [r3]
	bl	test_bit
	cmp	r0, #0
	ldrne	r2, [r4, #4]
	ldreq	r2, [r4, #32]
	mov	r1, r7
	mov	r0, sp
	bl	rt2x00_set_field32
	ldr	r3, .L11+104
	ldr	r2, [r4, #8]
	ldr	r1, [r3]
	mov	r0, sp
	bl	rt2x00_set_field32
	ldr	r3, .L11+108
	ldr	r2, [r6, #4]
	ldr	r1, [r3]
	ldr	r2, [r2]
	mov	r0, sp
	bl	rt2x00_set_field32
	ldr	r3, [r6]
	ldr	r2, .L11+112
	ldr	r1, .L11+116
	smull	r0, r2, r3, r2
	sub	r2, r2, r3, asr #31
	add	r2, r2, r2, lsl #1
	sub	r2, r3, r2
	ldr	r1, [r1]
	add	r2, r2, #1
	mov	r0, sp
	bl	rt2x00_set_field32
	mov	r1, #1
	mov	r0, r5
	ldr	r2, [sp]
	bl	rt2x00_desc_write
	ldr	r3, [r6, #4]
	ldr	r3, [r3, #4]
	cmp	r3, #11
	bls	.L1
	mov	r4, #2
.L5:
	mov	r1, r4
	mov	r2, #0
	mov	r0, r5
	bl	_rt2x00_desc_write
	ldr	r3, [r6, #4]
	add	r4, r4, #1
	ldr	r3, [r3, #4]
	cmp	r4, r3, lsr #2
	bcc	.L5
.L1:
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	.LC0
	.word	ENTRY_TXD_MORE_FRAG
	.word	TXWI_W0_FRAG
	.word	ENTRY_TXD_HT_MIMO_PS
	.word	TXWI_W0_MIMO_PS
	.word	TXWI_W0_CF_ACK
	.word	ENTRY_TXD_REQ_TIMESTAMP
	.word	TXWI_W0_TS
	.word	ENTRY_TXD_HT_AMPDU
	.word	TXWI_W0_AMPDU
	.word	TXWI_W0_MPDU_DENSITY
	.word	TXWI_W0_TX_OP
	.word	TXWI_W0_MCS
	.word	ENTRY_TXD_HT_BW_40
	.word	TXWI_W0_BW
	.word	ENTRY_TXD_HT_SHORT_GI
	.word	TXWI_W0_SHORT_GI
	.word	TXWI_W0_STBC
	.word	TXWI_W0_PHYMODE
	.word	ENTRY_TXD_ACK
	.word	TXWI_W1_ACK
	.word	ENTRY_TXD_GENERATE_SEQ
	.word	TXWI_W1_NSEQ
	.word	TXWI_W1_BW_WIN_SIZE
	.word	ENTRY_TXD_ENCRYPT
	.word	TXWI_W1_WIRELESS_CLI_ID
	.word	TXWI_W1_MPDU_TOTAL_BYTE_COUNT
	.word	TXWI_W1_PACKETID_QUEUE
	.word	1431655766
	.word	TXWI_W1_PACKETID_ENTRY
	.size	rt2800_write_tx_data, .-rt2800_write_tx_data
	.comm	TXWI_W1_WIRELESS_CLI_ID,4,4
	.comm	TXWI_W1_PACKETID_QUEUE,4,4
	.comm	TXWI_W1_PACKETID_ENTRY,4,4
	.comm	TXWI_W1_NSEQ,4,4
	.comm	TXWI_W1_MPDU_TOTAL_BYTE_COUNT,4,4
	.comm	TXWI_W1_BW_WIN_SIZE,4,4
	.comm	TXWI_W1_ACK,4,4
	.comm	TXWI_W0_TX_OP,4,4
	.comm	TXWI_W0_TS,4,4
	.comm	TXWI_W0_STBC,4,4
	.comm	TXWI_W0_SHORT_GI,4,4
	.comm	TXWI_W0_PHYMODE,4,4
	.comm	TXWI_W0_MPDU_DENSITY,4,4
	.comm	TXWI_W0_MIMO_PS,4,4
	.comm	TXWI_W0_MCS,4,4
	.comm	TXWI_W0_FRAG,4,4
	.comm	TXWI_W0_CF_ACK,4,4
	.comm	TXWI_W0_BW,4,4
	.comm	TXWI_W0_AMPDU,4,4
	.comm	ENTRY_TXD_REQ_TIMESTAMP,4,4
	.comm	ENTRY_TXD_MORE_FRAG,4,4
	.comm	ENTRY_TXD_HT_SHORT_GI,4,4
	.comm	ENTRY_TXD_HT_MIMO_PS,4,4
	.comm	ENTRY_TXD_HT_BW_40,4,4
	.comm	ENTRY_TXD_HT_AMPDU,4,4
	.comm	ENTRY_TXD_GENERATE_SEQ,4,4
	.comm	ENTRY_TXD_ENCRYPT,4,4
	.comm	ENTRY_TXD_ACK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
