	.file	"extr_main.c_mt7603_set_key.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mt7603_set_key, @function
mt7603_set_key:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, r8
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, QWORD PTR 8[rdx]
	mov	r8, rbx
	test	rcx, rcx
	je	.L3
	mov	rbx, QWORD PTR [rcx]
	mov	r8, rbx
.L3:
	mov	eax, DWORD PTR 4[r12]
	add	eax, -128
	cmp	eax, 1
	jbe	.L4
.L12:
	mov	eax, DWORD PTR EOPNOTSUPP[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rax, QWORD PTR [rdx]
	cmp	rax, QWORD PTR NL80211_IFTYPE_ADHOC[rip]
	je	.L6
	cmp	rax, QWORD PTR NL80211_IFTYPE_MESH_POINT[rip]
	je	.L6
	cmp	DWORD PTR SET_KEY[rip], esi
	mov	rbp, QWORD PTR [rdi]
	mov	eax, DWORD PTR [r12]
	je	.L15
.L8:
	xor	r12d, r12d
	cmp	DWORD PTR [rbx], eax
	je	.L16
.L9:
	mov	rdx, r12
	mov	rdi, rbp
	mov	rsi, r8
	call	mt76_wcid_key_setup@PLT
	mov	esi, DWORD PTR 4[rbx]
	mov	rdx, r12
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	mt7603_wtbl_set_key@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	eax, DWORD PTR 8[r12]
	test	DWORD PTR IEEE80211_KEY_FLAG_PAIRWISE[rip], eax
	je	.L12
	cmp	DWORD PTR SET_KEY[rip], esi
	mov	rbp, QWORD PTR [rdi]
	mov	eax, DWORD PTR [r12]
	jne	.L8
.L15:
	mov	edx, DWORD PTR 4[rbx]
	mov	DWORD PTR 12[r12], edx
	mov	DWORD PTR [rbx], eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L16:
	mov	DWORD PTR [rbx], -1
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	mt7603_set_key, .-mt7603_set_key
	.comm	SET_KEY,4,4
	.comm	NL80211_IFTYPE_MESH_POINT,8,8
	.comm	NL80211_IFTYPE_ADHOC,8,8
	.comm	IEEE80211_KEY_FLAG_PAIRWISE,4,4
	.comm	EOPNOTSUPP,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_main.c_mt7603_set_key.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mt7603_set_key, %function
mt7603_set_key:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r5, [sp, #16]
	cmp	r3, #0
	ldr	r4, [r2, #4]
	ldrne	r4, [r3]
	ldr	r3, [r5, #4]
	mov	ip, r2
	sub	r3, r3, #128
	cmp	r3, #1
	mov	lr, r4
	bls	.L4
.L12:
	ldr	r3, .L15
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, pc}
.L4:
	ldr	r2, .L15+4
	ldr	r3, [ip]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L6
	ldr	r2, .L15+8
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L6
.L7:
	ldr	r3, .L15+12
	ldr	r6, [r0]
	ldr	r3, [r3]
	ldr	r2, [r5]
	cmp	r3, r1
	beq	.L14
	ldr	r3, [r4]
	cmp	r3, r2
	mvneq	r3, #0
	moveq	r5, #0
	movne	r5, #0
	streq	r3, [r4]
.L9:
	mov	r1, lr
	mov	r2, r5
	mov	r0, r6
	bl	mt76_wcid_key_setup
	mov	r2, r5
	mov	r0, r6
	ldr	r1, [r4, #4]
	pop	{r4, r5, r6, lr}
	b	mt7603_wtbl_set_key
.L6:
	ldr	r3, .L15+16
	ldr	r2, [r5, #8]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L7
	b	.L12
.L14:
	ldr	r3, [r4, #4]
	str	r3, [r5, #12]
	str	r2, [r4]
	b	.L9
.L16:
	.align	2
.L15:
	.word	EOPNOTSUPP
	.word	NL80211_IFTYPE_ADHOC
	.word	NL80211_IFTYPE_MESH_POINT
	.word	SET_KEY
	.word	IEEE80211_KEY_FLAG_PAIRWISE
	.size	mt7603_set_key, .-mt7603_set_key
	.comm	SET_KEY,4,4
	.comm	NL80211_IFTYPE_MESH_POINT,4,4
	.comm	NL80211_IFTYPE_ADHOC,4,4
	.comm	IEEE80211_KEY_FLAG_PAIRWISE,4,4
	.comm	EOPNOTSUPP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
