	.file	"extr_rt2800lib.c_rt2800_init_rx_filter.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	rt2800_init_rx_filter, @function
rt2800_init_rx_filter:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, esi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	cmp	esi, 1
	mov	esi, 24
	lea	r15, 16[rsp]
	sbb	r12, r12
	and	r12, -32
	add	r12, 39
	mov	rdx, r12
	call	rt2800_rfcsr_write@PLT
	mov	esi, 4
	mov	rdi, rbp
	call	rt2800_bbp_read@PLT
	mov	esi, DWORD PTR BBP4_BANDWIDTH[rip]
	lea	edx, [r14+r14]
	lea	rdi, 8[rsp]
	mov	QWORD PTR 8[rsp], rax
	call	rt2x00_set_field8@PLT
	mov	edx, DWORD PTR 8[rsp]
	mov	esi, 4
	mov	rdi, rbp
	call	rt2800_bbp_write@PLT
	mov	esi, 31
	mov	rdi, rbp
	call	rt2800_rfcsr_read@PLT
	mov	esi, DWORD PTR RFCSR31_RX_H20M[rip]
	mov	edx, r14d
	mov	rdi, r15
	mov	QWORD PTR 16[rsp], rax
	mov	r14d, 100
	call	rt2x00_set_field8@PLT
	mov	rdx, QWORD PTR 16[rsp]
	mov	esi, 31
	mov	rdi, rbp
	call	rt2800_rfcsr_write@PLT
	mov	esi, 22
	mov	rdi, rbp
	call	rt2800_rfcsr_read@PLT
	mov	esi, DWORD PTR RFCSR22_BASEBAND_LOOPBACK[rip]
	mov	edx, 1
	mov	rdi, r15
	mov	QWORD PTR 16[rsp], rax
	call	rt2x00_set_field8@PLT
	mov	rdx, QWORD PTR 16[rsp]
	mov	esi, 22
	mov	rdi, rbp
	call	rt2800_rfcsr_write@PLT
	xor	edx, edx
	mov	esi, 24
	mov	rdi, rbp
	call	rt2800_bbp_write@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L13:
	sub	r14d, 1
	je	.L3
.L4:
	mov	edx, 144
	mov	esi, 25
	mov	rdi, rbp
	call	rt2800_bbp_write@PLT
	mov	edi, 1
	call	msleep@PLT
	mov	esi, 55
	mov	rdi, rbp
	call	rt2800_bbp_read@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L13
.L3:
	mov	edx, 6
	mov	esi, 24
	mov	rdi, rbp
	xor	r14d, r14d
	call	rt2800_bbp_write@PLT
	lea	r15, 100[r12]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L14:
	add	r12, 1
	cmp	rcx, r13
	mov	esi, 24
	mov	rdi, rbp
	sete	al
	mov	rdx, r12
	movzx	eax, al
	add	r14, rax
	call	rt2800_rfcsr_write@PLT
	cmp	r12, r15
	je	.L5
.L6:
	mov	edx, 144
	mov	esi, 25
	mov	rdi, rbp
	call	rt2800_bbp_write@PLT
	mov	edi, 1
	call	msleep@PLT
	mov	esi, 55
	mov	rdi, rbp
	call	rt2800_bbp_read@PLT
	mov	rcx, rbx
	sub	rcx, rax
	cmp	rcx, r13
	jle	.L14
.L5:
	xor	eax, eax
	test	r14, r14
	mov	esi, 24
	mov	rdi, rbp
	setne	al
	sub	r12, rax
	mov	rdx, r12
	call	rt2800_rfcsr_write@PLT
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L15
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	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
.L15:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	rt2800_init_rx_filter, .-rt2800_init_rx_filter
	.comm	RFCSR31_RX_H20M,4,4
	.comm	RFCSR22_BASEBAND_LOOPBACK,4,4
	.comm	BBP4_BANDWIDTH,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_init_rx_filter.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rt2800_init_rx_filter, %function
rt2800_init_rx_filter:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	subs	r6, r1, #0
	movne	r5, #39
	moveq	r5, #7
	mov	r4, r0
	ldr	r3, .L16
	sub	sp, sp, #20
	mov	r1, #24
	mov	r8, r2
	mov	r2, r5
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	rt2800_rfcsr_write
	mov	r1, #4
	mov	r0, r4
	bl	rt2800_bbp_read
	mov	r3, r0
	ldr	r1, .L16+4
	lsl	r2, r6, #1
	ldr	r1, [r1]
	add	r0, sp, #4
	str	r3, [sp, #4]
	bl	rt2x00_set_field8
	ldr	r2, [sp, #4]
	mov	r1, #4
	mov	r0, r4
	bl	rt2800_bbp_write
	mov	r1, #31
	mov	r0, r4
	bl	rt2800_rfcsr_read
	mov	r3, r0
	ldr	r1, .L16+8
	mov	r2, r6
	ldr	r1, [r1]
	add	r0, sp, #8
	str	r3, [sp, #8]
	bl	rt2x00_set_field8
	ldr	r2, [sp, #8]
	mov	r1, #31
	mov	r0, r4
	bl	rt2800_rfcsr_write
	mov	r1, #22
	mov	r0, r4
	bl	rt2800_rfcsr_read
	mov	r3, r0
	ldr	r2, .L16+12
	add	r0, sp, #8
	ldr	r1, [r2]
	mov	r2, #1
	str	r3, [sp, #8]
	bl	rt2x00_set_field8
	mov	r1, #22
	ldr	r2, [sp, #8]
	mov	r0, r4
	bl	rt2800_rfcsr_write
	mov	r0, r4
	mov	r2, #0
	mov	r1, #24
	bl	rt2800_bbp_write
	mov	r7, #100
	b	.L4
.L13:
	subs	r7, r7, #1
	beq	.L3
.L4:
	mov	r2, #144
	mov	r1, #25
	mov	r0, r4
	bl	rt2800_bbp_write
	mov	r0, #1
	bl	msleep
	mov	r1, #55
	mov	r0, r4
	bl	rt2800_bbp_read
	subs	r6, r0, #0
	beq	.L13
.L3:
	mov	r2, #6
	mov	r1, #24
	mov	r0, r4
	bl	rt2800_bbp_write
	mov	r7, #0
	add	r9, r5, #100
	b	.L6
.L14:
	moveq	r3, #1
	movne	r3, #0
	add	r5, r5, #1
	mov	r2, r5
	mov	r1, #24
	mov	r0, r4
	add	r7, r7, r3
	bl	rt2800_rfcsr_write
	cmp	r5, r9
	beq	.L5
.L6:
	mov	r2, #144
	mov	r1, #25
	mov	r0, r4
	bl	rt2800_bbp_write
	mov	r0, #1
	bl	msleep
	mov	r1, #55
	mov	r0, r4
	bl	rt2800_bbp_read
	sub	r0, r6, r0
	cmp	r0, r8
	ble	.L14
.L5:
	cmp	r7, #0
	subne	r5, r5, #1
	mov	r0, r4
	mov	r2, r5
	mov	r1, #24
	bl	rt2800_rfcsr_write
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L15:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	.LC0
	.word	BBP4_BANDWIDTH
	.word	RFCSR31_RX_H20M
	.word	RFCSR22_BASEBAND_LOOPBACK
	.size	rt2800_init_rx_filter, .-rt2800_init_rx_filter
	.comm	RFCSR31_RX_H20M,4,4
	.comm	RFCSR22_BASEBAND_LOOPBACK,4,4
	.comm	BBP4_BANDWIDTH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
