	.file	"extr_beacon.c_mt7603_pre_tbtt_tasklet.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mt7603_pre_tbtt_tasklet
	.type	mt7603_pre_tbtt_tasklet, @function
mt7603_pre_tbtt_tasklet:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pxor	xmm0, xmm0
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 104
	.cfi_def_cfa_offset 160
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 88[rsp], rax
	xor	eax, eax
	movaps	XMMWORD PTR 16[rsp], xmm0
	movaps	XMMWORD PTR 32[rsp], xmm0
	movaps	XMMWORD PTR 48[rsp], xmm0
	movaps	XMMWORD PTR 64[rsp], xmm0
	call	mt76_hw@PLT
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR IEEE80211_CONF_OFFCHANNEL[rip], eax
	je	.L26
.L1:
	mov	rax, QWORD PTR 88[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L27
	add	rsp, 104
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	lea	rbp, 64[rsp]
	mov	QWORD PTR 72[rsp], rbx
	mov	rdi, rbp
	call	__skb_queue_head_init@PLT
	mov	rdx, QWORD PTR MT_TXQ_BEACON[rip]
	mov	rax, QWORD PTR 32[rbx]
	mov	r13, QWORD PTR [rax+rdx*8]
	lea	r12, 8[r13]
	mov	rdi, r12
	call	spin_lock_bh@PLT
	mov	r15d, DWORD PTR mt7603_update_beacon_iter[rip]
	mov	r14d, DWORD PTR IEEE80211_IFACE_ITER_RESUME_ALL[rip]
	mov	rdi, rbx
	call	mt76_hw@PLT
	mov	rcx, rbx
	mov	edx, r15d
	mov	rdi, rax
	mov	esi, r14d
	call	ieee80211_iterate_active_interfaces_atomic@PLT
	mov	rsi, r13
	mov	rdi, rbx
	call	mt76_queue_kick@PLT
	mov	rdi, r12
	call	spin_unlock_bh@PLT
	mov	esi, 16
	mov	edi, 30
	call	GENMASK@PLT
	xor	edi, edi
	mov	r12d, eax
	call	BIT@PLT
	mov	esi, DWORD PTR MT_WF_ARB_CAB_FLUSH[rip]
	mov	edx, r12d
	mov	rdi, rbx
	or	edx, eax
	call	mt76_wr@PLT
	mov	rsi, QWORD PTR MT_TXQ_CAB[rip]
	xor	edx, edx
	mov	rdi, rbx
	call	mt76_queue_tx_cleanup@PLT
	lea	rdi, 24[rbx]
	call	mt76_csa_check@PLT
	cmp	QWORD PTR 40[rbx], 0
	jne	.L4
	mov	rax, QWORD PTR 32[rbx]
	mov	rdx, QWORD PTR MT_TXQ_CAB[rip]
	lea	r13, 16[rsp]
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	QWORD PTR 8[rsp], rax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, rbp
	call	skb_queue_len@PLT
	cmp	eax, 7
	jg	.L9
.L8:
	mov	rdi, rbp
	call	skb_queue_len@PLT
	mov	r14d, DWORD PTR mt7603_add_buffered_bc[rip]
	mov	r15d, DWORD PTR IEEE80211_IFACE_ITER_RESUME_ALL[rip]
	mov	rdi, rbx
	mov	r12d, eax
	call	mt76_hw@PLT
	mov	rcx, r13
	mov	edx, r14d
	mov	esi, r15d
	mov	rdi, rax
	call	ieee80211_iterate_active_interfaces_atomic@PLT
	mov	rdi, rbp
	call	skb_queue_len@PLT
	cmp	eax, r12d
	jne	.L5
.L9:
	mov	rdi, rbp
	call	skb_queue_empty@PLT
	test	rax, rax
	jne	.L4
	mov	rdi, QWORD PTR 16[rsp]
	xor	r12d, r12d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdi, QWORD PTR 16[rsp]
	mov	r8d, DWORD PTR [rdi+r12*4]
	test	r8d, r8d
	je	.L11
	mov	edi, r8d
	xor	esi, esi
	call	mt76_skb_set_moredata@PLT
	mov	rdi, QWORD PTR 16[rsp]
.L11:
	add	r12, 1
.L10:
	call	ARRAY_SIZE@PLT
	cmp	eax, r12d
	jg	.L12
	mov	rax, QWORD PTR 8[rsp]
	lea	r13, 8[rax]
	mov	rdi, r13
	call	spin_lock_bh@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdi, r12
	call	IEEE80211_SKB_CB@PLT
	xor	r8d, r8d
	mov	rdx, r12
	mov	rdi, rbx
	mov	rax, QWORD PTR [rax]
	mov	rsi, QWORD PTR MT_TXQ_CAB[rip]
	mov	rcx, QWORD PTR [rax]
	call	mt76_tx_queue_skb@PLT
.L13:
	mov	rdi, rbp
	call	__skb_dequeue@PLT
	mov	r12, rax
	test	rax, rax
	jne	.L14
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdi, rbx
	xor	ebp, ebp
	call	mt76_queue_kick@PLT
	mov	rdi, r13
	call	spin_unlock_bh@PLT
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rax, QWORD PTR 24[rsp]
	mov	edi, ebp
	mov	r12d, DWORD PTR [rax+rbp*4]
	call	MT_WF_ARB_CAB_COUNT_B0_SHIFT@PLT
	mov	edi, ebp
	add	rbp, 1
	mov	ecx, eax
	sal	r12d, cl
	call	MT_WF_ARB_CAB_COUNT_B0_REG@PLT
	mov	edx, r12d
	mov	rdi, rbx
	mov	esi, eax
	call	mt76_wr@PLT
.L15:
	mov	rdi, QWORD PTR 24[rsp]
	call	ARRAY_SIZE@PLT
	cmp	eax, ebp
	jg	.L16
	xor	edi, edi
	call	MT_WF_ARB_CAB_START_BSSn@PLT
	mov	edi, 1
	mov	ebp, eax
	call	MT_WF_ARB_CAB_START_BSS0n@PLT
	mov	esi, 1
	mov	rdi, rbx
	mov	r8d, eax
	mov	eax, DWORD PTR MT7603_MAX_INTERFACES[rip]
	lea	ecx, -1[rax]
	sal	esi, cl
	lea	eax, -1[rsi]
	mov	esi, DWORD PTR MT_WF_ARB_CAB_START[rip]
	imul	eax, r8d
	or	eax, ebp
	mov	edx, eax
	call	mt76_wr@PLT
.L4:
	mov	rsi, QWORD PTR MT_TXQ_BEACON[rip]
	xor	edx, edx
	mov	rdi, rbx
	call	mt76_queue_tx_cleanup@PLT
	mov	rax, QWORD PTR 32[rbx]
	mov	rdx, QWORD PTR MT_TXQ_BEACON[rip]
	mov	edi, DWORD PTR 24[rbx]
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	rbp, QWORD PTR [rax]
	call	hweight8@PLT
	cmp	rbp, rax
	jle	.L1
	add	DWORD PTR 16[rbx], 1
	jmp	.L1
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mt7603_pre_tbtt_tasklet, .-mt7603_pre_tbtt_tasklet
	.comm	mt7603_update_beacon_iter,4,4
	.comm	mt7603_add_buffered_bc,4,4
	.comm	MT_WF_ARB_CAB_START,4,4
	.comm	MT_WF_ARB_CAB_FLUSH,4,4
	.comm	MT_TXQ_CAB,8,8
	.comm	MT_TXQ_BEACON,8,8
	.comm	MT7603_MAX_INTERFACES,4,4
	.comm	IEEE80211_IFACE_ITER_RESUME_ALL,4,4
	.comm	IEEE80211_CONF_OFFCHANNEL,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_beacon.c_mt7603_pre_tbtt_tasklet.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mt7603_pre_tbtt_tasklet
	.syntax unified
	.arm
	.fpu softvfp
	.type	mt7603_pre_tbtt_tasklet, %function
mt7603_pre_tbtt_tasklet:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	ldr	r3, .L28
	sub	sp, sp, #52
	mov	r2, #32
	mov	r1, #0
	add	r0, sp, #12
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	bl	memset
	mov	r0, r4
	bl	mt76_hw
	ldr	r3, .L28+4
	ldr	r2, [r0]
	ldr	r3, [r3]
	ands	r5, r2, r3
	beq	.L26
.L1:
	ldr	r3, .L28
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L27
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L26:
	ldr	r7, .L28+8
	add	r0, sp, #36
	str	r4, [sp, #40]
	bl	__skb_queue_head_init
	ldr	r2, [r7]
	ldr	r3, [r4, #16]
	ldr	r9, .L28+12
	ldr	r10, [r3, r2, lsl #2]
	ldr	r6, .L28+16
	add	r8, r10, #4
	mov	r0, r8
	bl	spin_lock_bh
	mov	r0, r4
	bl	mt76_hw
	ldr	r3, .L28+20
	ldr	r1, [r9]
	ldr	r2, [r3]
	mov	r3, r4
	bl	ieee80211_iterate_active_interfaces_atomic
	mov	r1, r10
	mov	r0, r4
	bl	mt76_queue_kick
	mov	r0, r8
	bl	spin_unlock_bh
	ldr	r3, .L28+24
	mov	r1, #16
	mov	r0, #30
	ldr	r10, [r3]
	bl	GENMASK
	mov	r8, r0
	mov	r0, r5
	bl	BIT
	mov	r1, r10
	orr	r2, r8, r0
	mov	r0, r4
	bl	mt76_wr
	mov	r2, r5
	ldr	r1, [r6]
	mov	r0, r4
	bl	mt76_queue_tx_cleanup
	add	r0, r4, #12
	bl	mt76_csa_check
	ldr	r3, [r4, #20]
	cmp	r3, #0
	bne	.L4
	ldr	r2, [r6]
	ldr	r3, [r4, #16]
	ldr	r10, .L28+28
	ldr	r8, [r3, r2, lsl #2]
	b	.L8
.L5:
	add	r0, sp, #36
	bl	skb_queue_len
	cmp	r0, #7
	bgt	.L9
.L8:
	add	r0, sp, #36
	bl	skb_queue_len
	mov	r5, r0
	mov	r0, r4
	bl	mt76_hw
	ldr	r2, [r10]
	ldr	r1, [r9]
	add	r3, sp, #12
	bl	ieee80211_iterate_active_interfaces_atomic
	add	r0, sp, #36
	bl	skb_queue_len
	cmp	r0, r5
	bne	.L5
.L9:
	add	r0, sp, #36
	bl	skb_queue_empty
	subs	r5, r0, #0
	bne	.L4
	mov	r9, r5
	ldr	r0, [sp, #12]
	b	.L10
.L12:
	ldr	r0, [sp, #12]
	ldr	r3, [r0, r9, lsl #2]
	cmp	r3, #0
	beq	.L11
	mov	r0, r3
	mov	r1, #0
	bl	mt76_skb_set_moredata
	ldr	r0, [sp, #12]
.L11:
	add	r9, r9, #1
.L10:
	bl	ARRAY_SIZE
	cmp	r0, r9
	bgt	.L12
	add	r10, r8, #4
	mov	r0, r10
	bl	spin_lock_bh
	mov	r9, #0
	b	.L13
.L14:
	bl	IEEE80211_SKB_CB
	ldr	r3, [r0]
	ldr	r1, [r6]
	ldr	r3, [r3]
	mov	r2, fp
	mov	r0, r4
	str	r9, [sp]
	bl	mt76_tx_queue_skb
.L13:
	add	r0, sp, #36
	bl	__skb_dequeue
	subs	fp, r0, #0
	bne	.L14
	mov	r1, r8
	mov	r0, r4
	bl	mt76_queue_kick
	mov	r0, r10
	bl	spin_unlock_bh
	b	.L15
.L16:
	mov	r0, r5
	bl	MT_WF_ARB_CAB_COUNT_B0_REG
	ldr	r3, [sp, #16]
	mov	r6, r0
	mov	r0, r5
	ldr	r8, [r3, r5, lsl #2]
	bl	MT_WF_ARB_CAB_COUNT_B0_SHIFT
	mov	r1, r6
	lsl	r2, r8, r0
	mov	r0, r4
	bl	mt76_wr
	add	r5, r5, #1
.L15:
	ldr	r0, [sp, #16]
	bl	ARRAY_SIZE
	cmp	r0, r5
	bgt	.L16
	ldr	r3, .L28+32
	mov	r0, #0
	ldr	r6, [r3]
	bl	MT_WF_ARB_CAB_START_BSSn
	mov	r5, r0
	mov	r0, #1
	bl	MT_WF_ARB_CAB_START_BSS0n
	mvn	r3, #0
	ldr	r2, .L28+36
	mov	ip, r0
	ldr	r2, [r2]
	mov	r1, r6
	add	r2, r2, r3
	mvn	r3, r3, lsl r2
	mul	r3, ip, r3
	mov	r0, r4
	orr	r2, r3, r5
	bl	mt76_wr
.L4:
	mov	r2, #0
	ldr	r1, [r7]
	mov	r0, r4
	bl	mt76_queue_tx_cleanup
	ldr	r2, [r7]
	ldr	r3, [r4, #16]
	ldr	r0, [r4, #12]
	ldr	r3, [r3, r2, lsl #2]
	ldr	r5, [r3]
	bl	hweight8
	cmp	r5, r0
	ldrgt	r3, [r4, #8]
	addgt	r3, r3, #1
	strgt	r3, [r4, #8]
	b	.L1
.L27:
	bl	__stack_chk_fail
.L29:
	.align	2
.L28:
	.word	.LC0
	.word	IEEE80211_CONF_OFFCHANNEL
	.word	MT_TXQ_BEACON
	.word	IEEE80211_IFACE_ITER_RESUME_ALL
	.word	MT_TXQ_CAB
	.word	mt7603_update_beacon_iter
	.word	MT_WF_ARB_CAB_FLUSH
	.word	mt7603_add_buffered_bc
	.word	MT_WF_ARB_CAB_START
	.word	MT7603_MAX_INTERFACES
	.size	mt7603_pre_tbtt_tasklet, .-mt7603_pre_tbtt_tasklet
	.comm	mt7603_update_beacon_iter,4,4
	.comm	mt7603_add_buffered_bc,4,4
	.comm	MT_WF_ARB_CAB_START,4,4
	.comm	MT_WF_ARB_CAB_FLUSH,4,4
	.comm	MT_TXQ_CAB,4,4
	.comm	MT_TXQ_BEACON,4,4
	.comm	MT7603_MAX_INTERFACES,4,4
	.comm	IEEE80211_IFACE_ITER_RESUME_ALL,4,4
	.comm	IEEE80211_CONF_OFFCHANNEL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
