	.file	"extr_htc_drv_txrx.c_ath9k_rx_prepare.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Corrupted RX frame, dropping (len: %d)\n"
	.align 8
.LC1:
	.string	"Corrupted RX data len, dropping (dlen: %d, skblen: %d)\n"
	.text
	.p2align 4
	.type	ath9k_rx_prepare, @function
ath9k_rx_prepare:
.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
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdx
	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
	mov	rbx, rsi
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR 16[rdi]
	mov	r13, QWORD PTR 40[rsi]
	mov	rdi, QWORD PTR [rdi]
	mov	QWORD PTR 8[rsp], rax
	call	ath9k_hw_common@PLT
	mov	rdx, QWORD PTR 0[r13]
	cmp	rdx, QWORD PTR HTC_RX_FRAME_HEADER_SIZE[rip]
	mov	r14, rax
	jl	.L53
	mov	r15, QWORD PTR 8[r13]
	mov	edi, DWORD PTR [r15]
	call	be16_to_cpu@PLT
	mov	rcx, QWORD PTR 0[r13]
	mov	r8, rax
	mov	rax, rcx
	sub	rax, QWORD PTR HTC_RX_FRAME_HEADER_SIZE[rip]
	cmp	r8, rax
	je	.L4
	movsx	rdx, DWORD PTR [r15]
	lea	rsi, .LC1[rip]
	mov	rdi, r14
	xor	eax, eax
	call	ath_err@PLT
	xor	eax, eax
.L1:
	add	rsp, 40
	.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
.L4:
	.cfi_restore_state
	mov	rsi, r15
	mov	rdi, rbp
	call	ath9k_htc_err_stat_rx@PLT
	mov	rdx, QWORD PTR HTC_RX_FRAME_HEADER_SIZE[rip]
	mov	rsi, r15
	mov	rdi, rbx
	call	memcpy@PLT
	mov	esi, DWORD PTR HTC_RX_FRAME_HEADER_SIZE[rip]
	mov	rdi, r13
	call	skb_pull@PLT
	mov	rax, QWORD PTR 8[r13]
	mov	rdi, r13
	mov	r15, rax
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR 24[rsp], eax
	call	ieee80211_get_hdrlen_from_skb@PLT
	mov	r8d, eax
	mov	ecx, eax
	and	r8d, 3
	je	.L5
	lea	eax, [rax+r8]
	cdqe
	add	rax, QWORD PTR FCS_LEN[rip]
	cmp	QWORD PTR 0[r13], rax
	jl	.L5
	mov	rsi, QWORD PTR 8[r13]
	movsx	rax, r8d
	mov	edx, ecx
	mov	DWORD PTR 20[rsp], ecx
	mov	DWORD PTR 28[rsp], r8d
	lea	rdi, [rsi+rax*4]
	call	memmove@PLT
	mov	r8d, DWORD PTR 28[rsp]
	mov	rdi, r13
	mov	esi, r8d
	call	skb_pull@PLT
	mov	ecx, DWORD PTR 20[rsp]
	.p2align 4,,10
	.p2align 3
.L5:
	xor	esi, esi
	mov	edx, 32
	mov	rdi, r12
	mov	DWORD PTR 20[rsp], ecx
	call	memset@PLT
	mov	eax, DWORD PTR [rbx]
	mov	ecx, DWORD PTR 20[rsp]
	test	eax, eax
	jne	.L6
.L16:
	mov	eax, DWORD PTR 4[rbx]
	cmp	DWORD PTR ATH9K_RXKEYIX_INVALID[rip], eax
	je	.L54
.L51:
	mov	eax, DWORD PTR RX_FLAG_DECRYPTED[rip]
	or	DWORD PTR 8[r12], eax
.L17:
	mov	ecx, DWORD PTR 28[rbx]
	mov	edx, DWORD PTR 32[rbx]
	mov	rsi, r12
	mov	rdi, QWORD PTR 8[rsp]
	call	ath9k_process_rate@PLT
	mov	rsi, QWORD PTR 8[rbx]
	cmp	rsi, QWORD PTR ATH9K_RSSI_BAD[rip]
	mov	r13d, DWORD PTR 8[rbp]
	je	.L20
	mov	eax, DWORD PTR 24[rbx]
	test	eax, eax
	je	.L55
.L20:
	mov	edi, DWORD PTR 4[r15]
	call	ieee80211_is_beacon@PLT
	test	rax, rax
	jne	.L56
.L22:
	mov	edi, DWORD PTR 20[rbx]
	call	be64_to_cpu@PLT
	mov	DWORD PTR 24[r12], eax
	mov	rax, QWORD PTR 8[rsp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR 16[r12], eax
	mov	rax, QWORD PTR ATH_DEFAULT_NOISE_FLOOR[rip]
	add	rax, QWORD PTR 8[rbx]
	mov	DWORD PTR 20[r12], edx
	mov	QWORD PTR [r12], rax
	mov	eax, DWORD PTR 16[rbx]
	mov	DWORD PTR 12[r12], eax
	mov	eax, DWORD PTR RX_FLAG_MACTIME_END[rip]
	or	DWORD PTR 8[r12], eax
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, 1
	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
.L53:
	.cfi_restore_state
	mov	rdi, rax
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	ath_err@PLT
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L6:
	.cfi_restore_state
	test	DWORD PTR ATH9K_RXERR_CRC[rip], eax
	je	.L9
	mov	edx, DWORD PTR RX_FLAG_FAILED_FCS_CRC[rip]
	or	DWORD PTR 8[r12], edx
.L9:
	test	DWORD PTR ATH9K_RXERR_PHY[rip], eax
	jne	.L14
	mov	esi, DWORD PTR ATH9K_RXERR_DECRYPT[rip]
	mov	edx, DWORD PTR ATH9K_RXERR_MIC[rip]
	test	eax, esi
	jne	.L11
	test	eax, edx
	jne	.L57
.L11:
	mov	rdi, QWORD PTR 0[rbp]
	mov	r9, QWORD PTR NL80211_IFTYPE_MONITOR[rip]
	or	edx, esi
	cmp	QWORD PTR [rdi], r9
	je	.L58
	not	edx
	test	edx, eax
	jne	.L14
.L15:
	test	esi, eax
	jne	.L17
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L58:
	or	edx, DWORD PTR ATH9K_RXERR_CRC[rip]
	not	edx
	test	edx, eax
	je	.L15
	.p2align 4,,10
	.p2align 3
.L14:
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L56:
	mov	edi, DWORD PTR [r14]
	call	is_zero_ether_addr@PLT
	test	eax, eax
	jne	.L22
	mov	esi, DWORD PTR [r14]
	mov	edi, DWORD PTR [r15]
	call	ether_addr_equal@PLT
	test	rax, rax
	je	.L22
	xor	edi, edi
	cmp	DWORD PTR ATH_RSSI_DUMMY_MARKER[rip], r13d
	mov	r14, QWORD PTR 8[rbx]
	setne	dil
	call	likely@PLT
	test	rax, rax
	jne	.L59
.L24:
	test	r14, r14
	mov	edx, 0
	mov	rax, QWORD PTR 0[rbp]
	cmovs	r14, rdx
	mov	QWORD PTR 8[rax], r14
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L55:
	mov	edi, r13d
	call	ATH_RSSI_LPF@PLT
	mov	r13d, DWORD PTR 8[rbp]
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L57:
	mov	edi, DWORD PTR 24[rsp]
	mov	DWORD PTR 20[rsp], ecx
	call	ieee80211_is_ctl@PLT
	mov	ecx, DWORD PTR 20[rsp]
	test	rax, rax
	je	.L12
	mov	edx, DWORD PTR ATH9K_RXERR_MIC[rip]
	mov	esi, DWORD PTR ATH9K_RXERR_DECRYPT[rip]
	mov	eax, edx
	not	eax
	and	eax, DWORD PTR [rbx]
	mov	DWORD PTR [rbx], eax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L54:
	mov	edi, DWORD PTR 24[rsp]
	mov	DWORD PTR 20[rsp], ecx
	call	ieee80211_has_protected@PLT
	test	rax, rax
	je	.L17
	movsx	rcx, DWORD PTR 20[rsp]
	lea	eax, 4[rcx]
	cdqe
	cmp	QWORD PTR 0[r13], rax
	jl	.L17
	mov	rax, QWORD PTR 8[r13]
	mov	esi, DWORD PTR 4[r14]
	mov	edi, DWORD PTR 12[rax+rcx*4]
	sar	edi, 6
	call	test_bit@PLT
	test	rax, rax
	je	.L17
	jmp	.L51
.L12:
	mov	eax, DWORD PTR RX_FLAG_MMIC_ERROR[rip]
	mov	esi, DWORD PTR ATH9K_RXERR_DECRYPT[rip]
	or	DWORD PTR 8[r12], eax
	mov	edx, DWORD PTR ATH9K_RXERR_MIC[rip]
	mov	eax, DWORD PTR [rbx]
	jmp	.L11
.L59:
	mov	esi, DWORD PTR ATH_RSSI_EP_MULTIPLIER[rip]
	mov	edi, r13d
	call	ATH_EP_RND@PLT
	mov	r14, rax
	jmp	.L24
	.cfi_endproc
.LFE0:
	.size	ath9k_rx_prepare, .-ath9k_rx_prepare
	.comm	RX_FLAG_MMIC_ERROR,4,4
	.comm	RX_FLAG_MACTIME_END,4,4
	.comm	RX_FLAG_FAILED_FCS_CRC,4,4
	.comm	RX_FLAG_DECRYPTED,4,4
	.comm	NL80211_IFTYPE_MONITOR,8,8
	.comm	HTC_RX_FRAME_HEADER_SIZE,8,8
	.comm	FCS_LEN,8,8
	.comm	ATH_RSSI_EP_MULTIPLIER,4,4
	.comm	ATH_RSSI_DUMMY_MARKER,4,4
	.comm	ATH_DEFAULT_NOISE_FLOOR,8,8
	.comm	ATH9K_RXKEYIX_INVALID,4,4
	.comm	ATH9K_RXERR_PHY,4,4
	.comm	ATH9K_RXERR_MIC,4,4
	.comm	ATH9K_RXERR_DECRYPT,4,4
	.comm	ATH9K_RXERR_CRC,4,4
	.comm	ATH9K_RSSI_BAD,8,8
	.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_htc_drv_txrx.c_ath9k_rx_prepare.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Corrupted RX frame, dropping (len: %d)\012\000"
	.align	2
.LC1:
	.ascii	"Corrupted RX data len, dropping (dlen: %d, skblen: "
	.ascii	"%d)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ath9k_rx_prepare, %function
ath9k_rx_prepare:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	ldr	r7, [r1, #32]
	ldr	r9, .L61
	ldr	r0, [r0]
	sub	sp, sp, #12
	mov	r6, r2
	mov	r4, r1
	ldr	r10, [r5, #8]
	bl	ath9k_hw_common
	ldr	r2, [r7]
	ldr	r3, [r9]
	cmp	r2, r3
	blt	.L54
	ldr	fp, [r7, #4]
	mov	r8, r0
	ldr	r0, [fp]
	bl	be16_to_cpu
	ldr	r3, [r7]
	ldr	r2, [r9]
	sub	r2, r3, r2
	cmp	r0, r2
	beq	.L4
	mov	r0, r8
	ldr	r2, [fp]
	ldr	r1, .L61+4
	bl	ath_err
	mov	r0, #0
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	mov	r1, fp
	mov	r0, r5
	bl	ath9k_htc_err_stat_rx
	ldr	r2, [r9]
	mov	r1, fp
	mov	r0, r4
	bl	memcpy
	ldr	r1, [r9]
	mov	r0, r7
	bl	skb_pull
	ldr	fp, [r7, #4]
	mov	r0, r7
	ldr	r3, [fp, #4]
	str	r3, [sp]
	bl	ieee80211_get_hdrlen_from_skb
	ands	r3, r0, #3
	mov	r9, r0
	beq	.L5
	ldr	r1, .L61+8
	add	r2, r0, r3
	ldr	r0, [r1]
	ldr	r1, [r7]
	add	r2, r2, r0
	cmp	r1, r2
	blt	.L5
	ldr	r1, [r7, #4]
	mov	r2, r9
	add	r0, r1, r3, lsl #2
	str	r3, [sp, #4]
	bl	memmove
	ldr	r3, [sp, #4]
	mov	r0, r7
	mov	r1, r3
	bl	skb_pull
.L5:
	mov	r2, #24
	mov	r1, #0
	mov	r0, r6
	bl	memset
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L6
.L16:
	ldr	r2, .L61+12
	ldr	r3, [r4, #4]
	ldr	r2, [r2]
	cmp	r2, r3
	beq	.L55
.L51:
	ldr	r2, .L61+16
	ldr	r3, [r6, #4]
	ldr	r2, [r2]
	orr	r3, r3, r2
	str	r3, [r6, #4]
.L17:
	mov	r1, r6
	ldr	r3, [r4, #24]
	mov	r0, r10
	ldr	r2, [r4, #28]
	bl	ath9k_process_rate
	ldr	r3, .L61+20
	ldr	r1, [r4, #8]
	ldr	r3, [r3]
	cmp	r1, r3
	beq	.L52
	ldr	r3, [r4, #20]
	ldr	r7, [r5, #4]
	cmp	r3, #0
	beq	.L56
.L20:
	ldr	r0, [fp, #4]
	bl	ieee80211_is_beacon
	cmp	r0, #0
	bne	.L57
.L22:
	ldr	r0, [r4, #16]
	bl	be64_to_cpu
	mov	r2, r0
	mov	r0, #1
	ldr	r3, .L61+24
	ldr	r1, [r10]
	ldr	r3, [r3]
	ldr	ip, .L61+28
	str	r2, [r6, #20]
	ldr	r2, [r4, #8]
	ldr	lr, [ip]
	add	r2, r2, r3
	ldr	ip, [r4, #12]
	ldm	r1, {r1, r3}
	str	r3, [r6, #16]
	ldr	r3, [r6, #4]
	str	r2, [r6]
	orr	r3, r3, lr
	stmib	r6, {r3, ip}
	str	r1, [r6, #12]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L54:
	ldr	r1, .L61+32
	bl	ath_err
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	ldr	r1, .L61+36
	ldr	r2, [r1]
	tst	r3, r2
	ldrne	r2, .L61+40
	ldrne	r2, [r2]
	strne	r2, [r6, #4]
	ldr	r2, .L61+44
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L14
	ldr	r2, .L61+48
	ldr	ip, .L61+52
	ldr	r0, [r2]
	ldr	lr, [ip]
	tst	r3, r0
	bne	.L11
	tst	r3, lr
	bne	.L58
.L11:
	ldr	ip, [r5]
	ldr	r2, .L61+56
	ldr	ip, [ip]
	str	ip, [sp, #4]
	ldr	ip, [r2]
	orr	r2, lr, r0
	ldr	lr, [sp, #4]
	cmp	lr, ip
	beq	.L59
	bics	r2, r3, r2
	bne	.L14
.L15:
	tst	r3, r0
	bne	.L17
	b	.L16
.L59:
	ldr	r1, [r1]
	orr	r2, r2, r1
	bics	r2, r3, r2
	beq	.L15
.L14:
	mov	r0, #0
	b	.L1
.L56:
	mov	r0, r7
	bl	ATH_RSSI_LPF
.L52:
	ldr	r7, [r5, #4]
	b	.L20
.L57:
	ldr	r0, [r8]
	bl	is_zero_ether_addr
	cmp	r0, #0
	bne	.L22
	ldr	r1, [r8]
	ldr	r0, [fp]
	bl	ether_addr_equal
	cmp	r0, #0
	beq	.L22
	ldr	r3, .L61+60
	ldr	r8, [r4, #8]
	ldr	r0, [r3]
	subs	r0, r0, r7
	movne	r0, #1
	bl	likely
	cmp	r0, #0
	bne	.L60
.L24:
	ldr	r3, [r5]
	bic	r8, r8, r8, asr #31
	str	r8, [r3, #4]
	b	.L22
.L58:
	ldr	r0, [sp]
	bl	ieee80211_is_ctl
	cmp	r0, #0
	ldr	r2, .L61+48
	ldr	r1, .L61+36
	beq	.L12
	ldr	r3, .L61+52
	ldr	r0, [r2]
	ldr	lr, [r3]
	ldr	r3, [r4]
	bic	r3, r3, lr
	str	r3, [r4]
	b	.L11
.L55:
	ldr	r0, [sp]
	bl	ieee80211_has_protected
	cmp	r0, #0
	beq	.L17
	ldr	r3, [r7]
	add	r9, r9, #3
	cmp	r9, r3
	bge	.L17
	ldr	r3, [r7, #4]
	ldr	r1, [r8, #4]
	ldr	r0, [r3, r9, lsl #2]
	asr	r0, r0, #6
	bl	test_bit
	cmp	r0, #0
	beq	.L17
	b	.L51
.L12:
	ldr	r3, .L61+64
	ldr	ip, [r6, #4]
	ldr	r3, [r3]
	ldr	r0, [r2]
	ldr	r2, .L61+52
	orr	ip, ip, r3
	ldr	lr, [r2]
	ldr	r3, [r4]
	str	ip, [r6, #4]
	b	.L11
.L60:
	ldr	r3, .L61+68
	mov	r0, r7
	ldr	r1, [r3]
	bl	ATH_EP_RND
	mov	r8, r0
	b	.L24
.L62:
	.align	2
.L61:
	.word	HTC_RX_FRAME_HEADER_SIZE
	.word	.LC1
	.word	FCS_LEN
	.word	ATH9K_RXKEYIX_INVALID
	.word	RX_FLAG_DECRYPTED
	.word	ATH9K_RSSI_BAD
	.word	ATH_DEFAULT_NOISE_FLOOR
	.word	RX_FLAG_MACTIME_END
	.word	.LC0
	.word	ATH9K_RXERR_CRC
	.word	RX_FLAG_FAILED_FCS_CRC
	.word	ATH9K_RXERR_PHY
	.word	ATH9K_RXERR_DECRYPT
	.word	ATH9K_RXERR_MIC
	.word	NL80211_IFTYPE_MONITOR
	.word	ATH_RSSI_DUMMY_MARKER
	.word	RX_FLAG_MMIC_ERROR
	.word	ATH_RSSI_EP_MULTIPLIER
	.size	ath9k_rx_prepare, .-ath9k_rx_prepare
	.comm	RX_FLAG_MMIC_ERROR,4,4
	.comm	RX_FLAG_MACTIME_END,4,4
	.comm	RX_FLAG_FAILED_FCS_CRC,4,4
	.comm	RX_FLAG_DECRYPTED,4,4
	.comm	NL80211_IFTYPE_MONITOR,4,4
	.comm	HTC_RX_FRAME_HEADER_SIZE,4,4
	.comm	FCS_LEN,4,4
	.comm	ATH_RSSI_EP_MULTIPLIER,4,4
	.comm	ATH_RSSI_DUMMY_MARKER,4,4
	.comm	ATH_DEFAULT_NOISE_FLOOR,4,4
	.comm	ATH9K_RXKEYIX_INVALID,4,4
	.comm	ATH9K_RXERR_PHY,4,4
	.comm	ATH9K_RXERR_MIC,4,4
	.comm	ATH9K_RXERR_DECRYPT,4,4
	.comm	ATH9K_RXERR_CRC,4,4
	.comm	ATH9K_RSSI_BAD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
