	.file	"extr_ar5212_reset.c_ar5212ModifyRfBuffer.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ar5212ModifyRfBuffer
	.type	ar5212ModifyRfBuffer, @function
ar5212ModifyRfBuffer:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, esi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, r8d
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	xor	edi, edi
	cmp	r8d, 3
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	setle	dil
	mov	ebp, ecx
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, edx
	call	HALASSERT@PLT
	xor	edi, edi
	cmp	ebx, 32
	setle	dil
	call	HALASSERT@PLT
	lea	eax, [rbx+rbp]
	xor	edi, edi
	cmp	eax, 319
	setle	dil
	call	HALASSERT@PLT
	mov	edi, r14d
	mov	esi, ebx
	call	ath_hal_reverseBits@PLT
	lea	edx, 6[rbp]
	sub	ebp, 1
	mov	ecx, ebp
	cmovns	edx, ebp
	sar	ecx, 31
	shr	ecx, 29
	sar	edx, 3
	lea	edi, 0[rbp+rcx]
	and	edi, 7
	sub	edi, ecx
	test	ebx, ebx
	jle	.L1
	movsx	rdx, edx
	sal	r13d, 3
	mov	r11d, 8
	mov	r10d, 1
	lea	rdx, [r12+rdx*4]
	.p2align 4,,10
	.p2align 3
.L3:
	lea	ecx, [rdi+rbx]
	mov	esi, r10d
	mov	r9d, r10d
	mov	r8d, eax
	cmp	ecx, 8
	mov	ebp, DWORD PTR [rdx]
	cmovg	ecx, r11d
	add	rdx, 4
	sal	esi, cl
	mov	ecx, edi
	sal	r9d, cl
	sub	esi, 1
	mov	ecx, r9d
	sub	ecx, 1
	xor	esi, ecx
	mov	ecx, r13d
	sal	esi, cl
	mov	ecx, edi
	sal	r8d, cl
	mov	ecx, r13d
	sal	r8d, cl
	mov	ecx, r11d
	xor	r8d, ebp
	sub	ecx, edi
	xor	edi, edi
	and	esi, r8d
	sub	ebx, ecx
	sar	eax, cl
	xor	esi, ebp
	mov	DWORD PTR -4[rdx], esi
	test	ebx, ebx
	jg	.L3
.L1:
	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
	.cfi_endproc
.LFE0:
	.size	ar5212ModifyRfBuffer, .-ar5212ModifyRfBuffer
	.comm	MAX_ANALOG_START,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_ar5212_reset.c_ar5212ModifyRfBuffer.c"
	.text
	.align	2
	.global	ar5212ModifyRfBuffer
	.syntax unified
	.arm
	.fpu softvfp
	.type	ar5212ModifyRfBuffer, %function
ar5212ModifyRfBuffer:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r2
	mov	r5, r3
	mov	r8, r1
	ldr	r6, [sp, #24]
	mov	r7, r0
	cmp	r6, #3
	movgt	r0, #0
	movle	r0, #1
	bl	HALASSERT
	cmp	r4, #32
	movgt	r0, #0
	movle	r0, #1
	bl	HALASSERT
	add	r0, r4, r5
	cmp	r0, #320
	movge	r0, #0
	movlt	r0, #1
	bl	HALASSERT
	mov	r1, r4
	mov	r0, r8
	bl	ath_hal_reverseBits
	subs	r1, r5, #1
	addmi	r5, r5, #6
	movpl	r5, r1
	rsbs	r3, r1, #0
	and	r3, r3, #7
	and	r1, r1, #7
	rsbpl	r1, r3, #0
	cmp	r4, #0
	pople	{r4, r5, r6, r7, r8, pc}
	asr	r2, r5, #3
	mov	r5, #1
	sub	r2, r2, #-1073741823
	add	r2, r7, r2, lsl #2
	lsl	lr, r6, #3
.L3:
	add	r3, r1, r4
	cmp	r3, #8
	movge	r3, #8
	ldr	r7, [r2, #4]!
	lsl	r6, r5, r1
	lsl	r3, r5, r3
	lsl	ip, r0, r1
	sub	r3, r3, #1
	sub	r6, r6, #1
	rsb	r1, r1, #8
	eor	r3, r3, r6
	eor	ip, r7, ip, lsl lr
	sub	r4, r4, r1
	and	r3, ip, r3, lsl lr
	eor	r3, r3, r7
	cmp	r4, #0
	asr	r0, r0, r1
	str	r3, [r2]
	mov	r1, #0
	bgt	.L3
	pop	{r4, r5, r6, r7, r8, pc}
	.size	ar5212ModifyRfBuffer, .-ar5212ModifyRfBuffer
	.comm	MAX_ANALOG_START,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
