	.file	"extr_init.c_mt76_init_beacon_offsets.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mt76_init_beacon_offsets, @function
mt76_init_beacon_offsets:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	xmm0, xmm0
	xor	r10d, r10d
	xor	esi, esi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	r9d, DWORD PTR MT_BEACON_BASE[rip]
	mov	r8, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	movaps	XMMWORD PTR [rsp], xmm0
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	mov	eax, esi
	sar	eax, 2
	cdqe
	mov	r10d, DWORD PTR [rsp+rax*4]
.L3:
	mov	ecx, DWORD PTR [r8]
	mov	edi, esi
	sar	edi, 2
	sub	ecx, r9d
	movsx	rdi, edi
	lea	edx, 63[rcx]
	mov	eax, ecx
	mov	ecx, esi
	cmovs	eax, edx
	and	ecx, 3
	add	esi, 1
	add	r8, 4
	sal	ecx, 3
	sar	eax, 6
	sal	eax, cl
	or	eax, r10d
	mov	DWORD PTR [rsp+rdi*4], eax
	cmp	esi, 16
	jne	.L9
	xor	ebp, ebp
	mov	r13, rsp
.L2:
	mov	r12d, DWORD PTR 0[r13+rbp*4]
	mov	edi, ebp
	add	rbp, 1
	call	MT_BCN_OFFSET@PLT
	mov	rdi, rbx
	mov	esi, eax
	mov	edx, r12d
	call	mt7601u_wr@PLT
	cmp	rbp, 4
	jne	.L2
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L10
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mt76_init_beacon_offsets, .-mt76_init_beacon_offsets
	.comm	MT_BEACON_BASE,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_init.c_mt76_init_beacon_offsets.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mt76_init_beacon_offsets, %function
mt76_init_beacon_offsets:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	mov	r3, #0
	ldr	r2, .L12
	ldr	r1, .L12+4
	ldr	ip, [r4]
	sub	sp, sp, #24
	ldr	r2, [r2]
	str	r2, [sp, #20]
	mov	r2,#0
	mov	r5, r3
	mov	r2, r3
	mov	r0, r3
	ldr	lr, [r1]
	sub	ip, ip, #4
	str	r3, [sp, #4]
	str	r3, [sp, #8]
	str	r3, [sp, #12]
	str	r3, [sp, #16]
	b	.L3
.L10:
	bic	r3, r2, #3
	add	r3, r6, r3
	ldr	r5, [r3, #-20]
	asr	r0, r2, #2
.L3:
	ldr	r3, [ip, #4]!
	and	r1, r2, #3
	sub	r3, r3, lr
	add	r6, r3, #63
	cmp	r3, #0
	movlt	r3, r6
	lsl	r1, r1, #3
	asr	r3, r3, #6
	add	r2, r2, #1
	add	r6, sp, #24
	add	r0, r6, r0, lsl #2
	orr	r3, r5, r3, lsl r1
	cmp	r2, #16
	str	r3, [r0, #-20]
	bne	.L10
	mov	r5, #0
	add	r6, sp, #4
.L4:
	mov	r0, r5
	bl	MT_BCN_OFFSET
	add	r5, r5, #1
	mov	r1, r0
	ldr	r2, [r6], #4
	mov	r0, r4
	bl	mt7601u_wr
	cmp	r5, #4
	bne	.L4
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, pc}
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	MT_BEACON_BASE
	.size	mt76_init_beacon_offsets, .-mt76_init_beacon_offsets
	.comm	MT_BEACON_BASE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
