	.file	"extr_wpa.c_ieee80211_crypto_ccmp_decrypt.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ieee80211_crypto_ccmp_decrypt
	.type	ieee80211_crypto_ccmp_decrypt, @function
ieee80211_crypto_ccmp_decrypt:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 56
	mov	r15, QWORD PTR 8[rdi]
	mov	r14, QWORD PTR 24[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rdi, r15
	movsx	r13, DWORD PTR [r15]
	call	IEEE80211_SKB_RXCB@PLT
	mov	rcx, rsp
	mov	r12, rax
	movsx	rax, DWORD PTR CCMP_PN_LEN[rip]
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L33:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L33
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L34
.L4:
	mov	edi, DWORD PTR 0[r13]
	mov	QWORD PTR -80[rbp], rsp
	call	ieee80211_hdrlen@PLT
	mov	edi, DWORD PTR 0[r13]
	mov	DWORD PTR -68[rbp], eax
	call	ieee80211_is_data@PLT
	test	eax, eax
	je	.L35
.L5:
	mov	esi, DWORD PTR CCMP_HDR_LEN[rip]
	mov	eax, DWORD PTR 16[rbx]
	mov	r13d, DWORD PTR 4[r15]
	sub	r13d, DWORD PTR -68[rbp]
	sub	r13d, esi
	sub	r13d, DWORD PTR CCMP_MIC_LEN[rip]
	test	eax, eax
	je	.L31
	test	r13d, r13d
	js	.L31
	mov	rdi, QWORD PTR 8[rbx]
	mov	eax, DWORD PTR [r12]
	test	DWORD PTR RX_FLAG_DECRYPTED[rip], eax
	je	.L9
	add	esi, DWORD PTR -68[rbp]
	call	pskb_may_pull@PLT
	test	eax, eax
	je	.L31
.L10:
	mov	rdi, QWORD PTR -80[rbp]
	mov	esi, DWORD PTR -68[rbp]
	add	esi, DWORD PTR [r15]
	call	ccmp_hdr2pn@PLT
	movsx	rbx, DWORD PTR [rbx]
	mov	rax, QWORD PTR [r14]
	mov	edx, DWORD PTR CCMP_PN_LEN[rip]
	mov	rdi, QWORD PTR -80[rbp]
	mov	esi, DWORD PTR [rax+rbx*4]
	call	memcmp@PLT
	test	rax, rax
	jle	.L36
	mov	eax, DWORD PTR [r12]
	test	DWORD PTR RX_FLAG_DECRYPTED[rip], eax
	jne	.L12
	mov	eax, DWORD PTR AES_BLOCK_SIZE[rip]
	mov	rcx, rsp
	mov	r12, rsp
	lea	eax, [rax+rax*2]
	add	eax, eax
	cdqe
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L14
.L37:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L37
.L14:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L15
	or	QWORD PTR -8[rsp+rdx], 0
.L15:
	mov	r11, rsp
	mov	rsi, QWORD PTR -80[rbp]
	mov	ecx, 1
	mov	rdi, r15
	mov	rdx, r11
	mov	QWORD PTR -88[rbp], r11
	call	ccmp_special_blocks@PLT
	mov	r8d, DWORD PTR [r15]
	mov	eax, DWORD PTR -68[rbp]
	mov	ecx, r13d
	mov	r11, QWORD PTR -88[rbp]
	mov	edi, DWORD PTR 8[r14]
	lea	edx, [r8+rax]
	add	edx, DWORD PTR CCMP_HDR_LEN[rip]
	add	r8d, DWORD PTR 4[r15]
	mov	r9d, edx
	sub	r8d, DWORD PTR CCMP_MIC_LEN[rip]
	mov	rsi, r11
	call	ieee80211_aes_ccm_decrypt@PLT
	test	rax, rax
	jne	.L38
	mov	rsp, r12
.L12:
	mov	rax, QWORD PTR [r14]
	mov	rsi, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR CCMP_PN_LEN[rip]
	mov	edi, DWORD PTR [rax+rbx*4]
	call	memcpy@PLT
	mov	esi, DWORD PTR 4[r15]
	mov	rdi, r15
	sub	esi, DWORD PTR CCMP_MIC_LEN[rip]
	call	pskb_trim@PLT
	test	rax, rax
	jne	.L31
	mov	esi, DWORD PTR [r15]
	mov	edi, DWORD PTR CCMP_HDR_LEN[rip]
	mov	edx, DWORD PTR -68[rbp]
	add	edi, esi
	call	memmove@PLT
	mov	esi, DWORD PTR CCMP_HDR_LEN[rip]
	mov	rdi, r15
	call	skb_pull@PLT
	mov	eax, DWORD PTR RX_CONTINUE[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	call	skb_linearize@PLT
	test	rax, rax
	je	.L10
	.p2align 4,,10
	.p2align 3
.L31:
	mov	eax, DWORD PTR RX_DROP_UNUSABLE[rip]
.L1:
	mov	rcx, QWORD PTR -56[rbp]
	xor	rcx, QWORD PTR fs:40
	jne	.L39
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore_state
	mov	rdi, r13
	call	ieee80211_is_robust_mgmt_frame@PLT
	test	eax, eax
	jne	.L5
	mov	eax, DWORD PTR RX_CONTINUE[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L34:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L36:
	add	DWORD PTR 12[r14], 1
	mov	eax, DWORD PTR RX_DROP_UNUSABLE[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L38:
	mov	eax, DWORD PTR RX_DROP_UNUSABLE[rip]
	mov	rsp, r12
	jmp	.L1
.L39:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ieee80211_crypto_ccmp_decrypt, .-ieee80211_crypto_ccmp_decrypt
	.comm	RX_FLAG_DECRYPTED,4,4
	.comm	RX_DROP_UNUSABLE,4,4
	.comm	RX_CONTINUE,4,4
	.comm	CCMP_PN_LEN,4,4
	.comm	CCMP_MIC_LEN,4,4
	.comm	CCMP_HDR_LEN,4,4
	.comm	AES_BLOCK_SIZE,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_wpa.c_ieee80211_crypto_ccmp_decrypt.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ieee80211_crypto_ccmp_decrypt
	.syntax unified
	.arm
	.fpu softvfp
	.type	ieee80211_crypto_ccmp_decrypt, %function
ieee80211_crypto_ccmp_decrypt:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #36
	mov	r9, r0
	ldr	r3, .L23
	ldr	r4, [r0, #4]
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	ldr	r3, [r9, #12]
	mov	r0, r4
	ldr	r8, [r4]
	str	r3, [fp, #-48]
	bl	IEEE80211_SKB_RXCB
	ldr	r7, .L23+4
	mov	r6, r0
	ldr	r3, [r7]
	ldr	r0, [r8]
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	bl	ieee80211_hdrlen
	mov	r5, r0
	ldr	r0, [r8]
	bl	ieee80211_is_data
	cmp	r0, #0
	add	r10, sp, #8
	beq	.L19
.L2:
	ldr	r2, .L23+8
	ldr	r3, [r4, #4]
	ldr	r8, .L23+12
	ldr	r1, [r2]
	ldr	ip, [r8]
	ldr	r0, [r9, #8]
	sub	r3, r3, r5
	sub	r3, r3, r1
	sub	r3, r3, ip
	cmp	r0, #0
	str	r3, [fp, #-52]
	moveq	r3, #1
	lsrne	r3, r3, #31
	cmp	r3, #0
	beq	.L4
.L17:
	ldr	r3, .L23+16
	ldr	r0, [r3]
.L1:
	ldr	r3, .L23
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	ldr	r3, .L23+20
	ldr	lr, [r6]
	ldr	ip, [r3]
	ldr	r0, [r9, #4]
	tst	lr, ip
	beq	.L5
	add	r1, r1, r5
	bl	pskb_may_pull
	cmp	r0, #0
	beq	.L17
.L6:
	ldr	r1, [r4]
	mov	r0, r10
	add	r1, r5, r1
	bl	ccmp_hdr2pn
	ldr	r2, [fp, #-48]
	ldr	r3, [r9]
	ldr	r1, [r2]
	mov	r0, r10
	ldr	r1, [r1, r3, lsl #2]
	ldr	r2, [r7]
	mov	r9, r3
	bl	memcmp
	cmp	r0, #0
	ldr	r3, .L23+20
	ble	.L21
	ldr	r2, [r6]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L8
	ldr	r3, .L23+24
	mov	r6, sp
	ldr	r2, [r3]
	mov	r3, #1
	add	r2, r2, r2, lsl r3
	sub	r2, r6, r2, lsl #3
	mov	sp, r2
	mov	r1, r10
	add	r2, sp, #8
	mov	r0, r4
	str	r2, [fp, #-56]
	bl	ccmp_special_blocks
	ldr	r2, .L23+8
	ldr	r3, [r4]
	ldr	r1, [r2]
	add	lr, r3, r5
	ldr	r2, [fp, #-48]
	add	lr, lr, r1
	ldr	r0, [r2, #4]
	str	lr, [sp, #4]
	ldr	r1, [r4, #4]
	ldr	ip, [r8]
	ldr	r2, [fp, #-56]
	add	r3, r3, r1
	sub	ip, r3, ip
	mov	r1, r2
	ldr	r3, [fp, #-52]
	mov	r2, lr
	str	ip, [sp]
	bl	ieee80211_aes_ccm_decrypt
	cmp	r0, #0
	bne	.L22
	mov	sp, r6
.L8:
	ldr	r3, [fp, #-48]
	mov	r1, r10
	ldr	r3, [r3]
	ldr	r2, [r7]
	ldr	r0, [r3, r9, lsl #2]
	bl	memcpy
	ldr	r3, [r8]
	ldr	r1, [r4, #4]
	mov	r0, r4
	sub	r1, r1, r3
	bl	pskb_trim
	cmp	r0, #0
	bne	.L17
	ldr	r6, .L23+8
	ldr	r1, [r4]
	ldr	r0, [r6]
	mov	r2, r5
	add	r0, r1, r0
	bl	memmove
	mov	r0, r4
	ldr	r1, [r6]
	bl	skb_pull
	ldr	r3, .L23+28
	ldr	r0, [r3]
	b	.L1
.L19:
	mov	r0, r8
	bl	ieee80211_is_robust_mgmt_frame
	cmp	r0, #0
	bne	.L2
	ldr	r3, .L23+28
	ldr	r0, [r3]
	b	.L1
.L5:
	bl	skb_linearize
	cmp	r0, #0
	beq	.L6
	b	.L17
.L21:
	ldr	r1, [fp, #-48]
	ldr	r2, .L23+16
	ldr	r3, [r1, #8]
	ldr	r0, [r2]
	add	r3, r3, #1
	str	r3, [r1, #8]
	b	.L1
.L22:
	ldr	r3, .L23+16
	ldr	r0, [r3]
	mov	sp, r6
	b	.L1
.L20:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	.LC0
	.word	CCMP_PN_LEN
	.word	CCMP_HDR_LEN
	.word	CCMP_MIC_LEN
	.word	RX_DROP_UNUSABLE
	.word	RX_FLAG_DECRYPTED
	.word	AES_BLOCK_SIZE
	.word	RX_CONTINUE
	.size	ieee80211_crypto_ccmp_decrypt, .-ieee80211_crypto_ccmp_decrypt
	.comm	RX_FLAG_DECRYPTED,4,4
	.comm	RX_DROP_UNUSABLE,4,4
	.comm	RX_CONTINUE,4,4
	.comm	CCMP_PN_LEN,4,4
	.comm	CCMP_MIC_LEN,4,4
	.comm	CCMP_HDR_LEN,4,4
	.comm	AES_BLOCK_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
