	.file	"extr_main.c_wlcore_set_key.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"mac80211 set key"
.LC1:
	.string	"CMD: 0x%x sta: %p"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"Key: algo:0x%x, id:%d, len:%d flags 0x%x"
	.section	.rodata.str1.1
.LC3:
	.string	"KEY: "
.LC4:
	.string	"Unknown key algo 0x%x"
.LC5:
	.string	"Could not add or replace key"
.LC6:
	.string	"build arp rsp failed: %d"
.LC7:
	.string	"Could not remove key"
.LC8:
	.string	"Unsupported key cmd 0x%x"
	.text
	.p2align 4
	.globl	wlcore_set_key
	.type	wlcore_set_key, @function
wlcore_set_key:
.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	r14, rdi
	mov	rdi, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, r8
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	wl12xx_vif_to_data@PLT
	mov	edi, DWORD PTR DEBUG_MAC80211[rip]
	lea	rsi, .LC0[rip]
	mov	r12, rax
	xor	eax, eax
	call	wl1271_debug@PLT
	mov	edi, DWORD PTR DEBUG_CRYPT[rip]
	mov	rcx, r13
	mov	edx, ebp
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	wl1271_debug@PLT
	mov	ecx, DWORD PTR 12[rbx]
	mov	r9d, DWORD PTR 16[rbx]
	xor	eax, eax
	mov	r8d, DWORD PTR 8[rbx]
	mov	edx, DWORD PTR [rbx]
	lea	rsi, .LC2[rip]
	mov	edi, DWORD PTR DEBUG_CRYPT[rip]
	call	wl1271_debug@PLT
	mov	ecx, DWORD PTR 8[rbx]
	mov	edx, DWORD PTR 4[rbx]
	lea	rsi, .LC3[rip]
	mov	edi, DWORD PTR DEBUG_CRYPT[rip]
	call	wl1271_dump@PLT
	mov	rax, QWORD PTR BSS_TYPE_AP_BSS[rip]
	cmp	QWORD PTR [r12], rax
	je	.L25
	mov	rax, QWORD PTR 16[r12]
.L4:
	cmp	QWORD PTR WL12XX_INVALID_LINK_ID[rip], rax
	jne	.L26
	mov	esi, DWORD PTR [rbx]
	xor	eax, eax
	xor	r15d, r15d
	cmp	esi, 131
	je	.L6
.L32:
	jg	.L7
	cmp	esi, 130
	jne	.L27
	mov	edx, DWORD PTR 12[rbx]
	mov	r8, QWORD PTR KEY_TKIP[rip]
	mov	DWORD PTR 20[rbx], edx
.L12:
	cmp	ebp, 133
	je	.L14
	.p2align 4,,10
	.p2align 3
.L29:
	cmp	ebp, 134
	je	.L15
	mov	esi, ebp
	lea	rdi, .LC8[rip]
	xor	eax, eax
	call	wl1271_error@PLT
	mov	r15d, DWORD PTR EOPNOTSUPP[rip]
	neg	r15d
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	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
.L27:
	.cfi_restore_state
	cmp	esi, 127
	jg	.L28
.L10:
	lea	rdi, .LC4[rip]
	xor	eax, eax
	call	wl1271_error@PLT
	mov	r15d, DWORD PTR EOPNOTSUPP[rip]
	neg	r15d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	mov	r8, QWORD PTR KEY_GEM[rip]
	cmp	esi, 132
	jne	.L10
	cmp	ebp, 133
	jne	.L29
.L14:
	push	r13
	.cfi_def_cfa_offset 88
	mov	ecx, DWORD PTR 12[rbx]
	mov	rsi, r12
	mov	rdi, r14
	mov	r9d, DWORD PTR 8[rbx]
	mov	edx, DWORD PTR KEY_ADD_OR_REPLACE[rip]
	push	rax
	.cfi_def_cfa_offset 96
	mov	eax, DWORD PTR 4[rbx]
	push	r15
	.cfi_def_cfa_offset 104
	push	rax
	.cfi_def_cfa_offset 112
	mov	QWORD PTR 40[rsp], r8
	call	wl1271_set_key@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 80
	mov	r8, QWORD PTR 8[rsp]
	test	eax, eax
	mov	r15d, eax
	js	.L30
	mov	rax, QWORD PTR BSS_TYPE_STA_BSS[rip]
	cmp	QWORD PTR [r12], rax
	jne	.L1
	test	r13, r13
	je	.L31
.L18:
	cmp	QWORD PTR 8[r12], r8
	je	.L1
	mov	QWORD PTR 8[r12], r8
	mov	rsi, r12
	mov	rdi, r14
	call	wl1271_cmd_build_arp_rsp@PLT
	mov	r15d, eax
	test	eax, eax
	jns	.L1
	mov	esi, eax
	lea	rdi, .LC6[rip]
	call	wl1271_warning@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	eax, DWORD PTR 4[rbx]
	push	r13
	.cfi_def_cfa_offset 88
	mov	rsi, r12
	mov	rdi, r14
	mov	ecx, DWORD PTR 12[rbx]
	mov	r9d, DWORD PTR 8[rbx]
	push	0
	.cfi_def_cfa_offset 96
	push	0
	.cfi_def_cfa_offset 104
	mov	edx, DWORD PTR KEY_REMOVE[rip]
	push	rax
	.cfi_def_cfa_offset 112
	call	wl1271_set_key@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 80
	mov	r15d, eax
	test	eax, eax
	jns	.L1
	lea	rdi, .LC7[rip]
	xor	eax, eax
	call	wl1271_error@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L26:
	mov	rdx, QWORD PTR [r14]
	mov	edi, DWORD PTR [rdx+rax*4]
	mov	DWORD PTR 8[rsp], edi
	call	WL1271_TX_SECURITY_HI32@PLT
	mov	edi, DWORD PTR 8[rsp]
	mov	r15d, eax
	call	WL1271_TX_SECURITY_LO16@PLT
	mov	esi, DWORD PTR [rbx]
	cmp	esi, 131
	jne	.L32
.L6:
	mov	edx, DWORD PTR IEEE80211_KEY_FLAG_PUT_IV_SPACE[rip]
	mov	r8, QWORD PTR KEY_AES[rip]
	or	DWORD PTR 16[rbx], edx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L25:
	test	r13, r13
	je	.L3
	mov	rax, QWORD PTR 0[r13]
	mov	rax, QWORD PTR [rax]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L28:
	mov	edx, DWORD PTR 12[rbx]
	mov	r8, QWORD PTR KEY_WEP[rip]
	mov	DWORD PTR 20[rbx], edx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rax, QWORD PTR 24[r12]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L30:
	lea	rdi, .LC5[rip]
	xor	eax, eax
	call	wl1271_error@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L31:
	cmp	QWORD PTR KEY_WEP[rip], r8
	jne	.L1
	jmp	.L18
	.cfi_endproc
.LFE0:
	.size	wlcore_set_key, .-wlcore_set_key
	.comm	WL12XX_INVALID_LINK_ID,8,8
	.comm	KEY_WEP,8,8
	.comm	KEY_TKIP,8,8
	.comm	KEY_REMOVE,4,4
	.comm	KEY_GEM,8,8
	.comm	KEY_AES,8,8
	.comm	KEY_ADD_OR_REPLACE,4,4
	.comm	IEEE80211_KEY_FLAG_PUT_IV_SPACE,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	DEBUG_MAC80211,4,4
	.comm	DEBUG_CRYPT,4,4
	.comm	BSS_TYPE_STA_BSS,8,8
	.comm	BSS_TYPE_AP_BSS,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_main.c_wlcore_set_key.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"mac80211 set key\000"
	.align	2
.LC1:
	.ascii	"CMD: 0x%x sta: %p\000"
	.align	2
.LC2:
	.ascii	"Key: algo:0x%x, id:%d, len:%d flags 0x%x\000"
	.align	2
.LC3:
	.ascii	"KEY: \000"
	.align	2
.LC4:
	.ascii	"Unknown key algo 0x%x\000"
	.align	2
.LC5:
	.ascii	"Could not add or replace key\000"
	.align	2
.LC6:
	.ascii	"build arp rsp failed: %d\000"
	.align	2
.LC7:
	.ascii	"Could not remove key\000"
	.align	2
.LC8:
	.ascii	"Unsupported key cmd 0x%x\000"
	.text
	.align	2
	.global	wlcore_set_key
	.syntax unified
	.arm
	.fpu softvfp
	.type	wlcore_set_key, %function
wlcore_set_key:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r8, r0
	sub	sp, sp, #24
	mov	r0, r2
	ldr	r4, [sp, #56]
	mov	r5, r1
	mov	r7, r3
	bl	wl12xx_vif_to_data
	mov	r6, r0
	ldr	r3, .L26
	ldr	r9, .L26+4
	ldr	r0, [r3]
	ldr	r1, .L26+8
	bl	wl1271_debug
	mov	r3, r7
	mov	r2, r5
	ldr	r1, .L26+12
	ldr	r0, [r9]
	bl	wl1271_debug
	ldr	r2, [r4, #16]
	ldr	r3, [r4, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	ldr	r3, [r4, #12]
	ldr	r2, [r4]
	ldr	r1, .L26+16
	ldr	r0, [r9]
	bl	wl1271_debug
	ldmib	r4, {r2, r3}
	ldr	r0, [r9]
	ldr	r1, .L26+20
	bl	wl1271_dump
	ldr	r3, .L26+24
	ldr	r2, [r6]
	ldr	r3, [r3]
	cmp	r2, r3
	ldrne	r3, [r6, #8]
	bne	.L4
	cmp	r7, #0
	ldrne	r3, [r7]
	ldreq	r3, [r6, #12]
	ldrne	r3, [r3]
.L4:
	ldr	r2, .L26+28
	ldr	r2, [r2]
	cmp	r2, r3
	moveq	r0, #0
	moveq	r10, r0
	beq	.L5
	ldr	r2, [r8]
	ldr	r9, [r2, r3, lsl #2]
	mov	r0, r9
	bl	WL1271_TX_SECURITY_HI32
	mov	r10, r0
	mov	r0, r9
	bl	WL1271_TX_SECURITY_LO16
.L5:
	ldr	r1, [r4]
	sub	r3, r1, #128
	cmp	r3, #4
	ldrls	pc, [pc, r3, asl #2]
	b	.L6
.L8:
	.word	.L11
	.word	.L11
	.word	.L10
	.word	.L9
	.word	.L7
.L11:
	ldr	r2, .L26+32
	ldr	r3, [r4, #12]
	ldr	r9, [r2]
	str	r3, [r4, #20]
.L12:
	cmp	r5, #133
	beq	.L14
.L23:
	cmp	r5, #134
	beq	.L15
	mov	r1, r5
	ldr	r0, .L26+36
	bl	wl1271_error
	ldr	r3, .L26+40
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L7:
	ldr	r3, .L26+44
	cmp	r5, #133
	ldr	r9, [r3]
	bne	.L23
.L14:
	ldr	r1, [r4, #4]
	str	r0, [sp, #16]
	str	r7, [sp, #20]
	ldr	r3, [r4, #8]
	ldr	r2, .L26+48
	str	r10, [sp, #12]
	str	r9, [sp]
	ldr	r2, [r2]
	str	r1, [sp, #8]
	str	r3, [sp, #4]
	ldr	r3, [r4, #12]
	mov	r1, r6
	mov	r0, r8
	bl	wl1271_set_key
	subs	r4, r0, #0
	blt	.L24
	ldr	r3, .L26+52
	ldr	r2, [r6]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L1
	cmp	r7, #0
	beq	.L25
.L18:
	ldr	r3, [r6, #4]
	cmp	r3, r9
	beq	.L1
	mov	r1, r6
	mov	r0, r8
	str	r9, [r6, #4]
	bl	wl1271_cmd_build_arp_rsp
	subs	r4, r0, #0
	bge	.L1
	mov	r1, r4
	ldr	r0, .L26+56
	bl	wl1271_warning
	b	.L1
.L9:
	ldr	r2, .L26+60
	ldr	r3, [r4, #16]
	ldr	r1, [r2]
	ldr	r2, .L26+64
	orr	r3, r3, r1
	ldr	r9, [r2]
	str	r3, [r4, #16]
	b	.L12
.L10:
	ldr	r2, .L26+68
	ldr	r3, [r4, #12]
	ldr	r9, [r2]
	str	r3, [r4, #20]
	b	.L12
.L15:
	mov	r3, #0
	str	r7, [sp, #20]
	str	r9, [sp]
	ldr	lr, [r4, #4]
	ldr	ip, [r4, #8]
	ldr	r2, .L26+72
	str	r3, [sp, #16]
	str	r3, [sp, #12]
	ldr	r2, [r2]
	stmib	sp, {ip, lr}
	mov	r1, r6
	ldr	r3, [r4, #12]
	mov	r0, r8
	bl	wl1271_set_key
	subs	r4, r0, #0
	bge	.L1
	ldr	r0, .L26+76
	bl	wl1271_error
	b	.L1
.L24:
	ldr	r0, .L26+80
	bl	wl1271_error
	b	.L1
.L25:
	ldr	r3, .L26+32
	ldr	r3, [r3]
	cmp	r3, r9
	bne	.L1
	b	.L18
.L6:
	ldr	r0, .L26+84
	bl	wl1271_error
	ldr	r3, .L26+40
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L27:
	.align	2
.L26:
	.word	DEBUG_MAC80211
	.word	DEBUG_CRYPT
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	BSS_TYPE_AP_BSS
	.word	WL12XX_INVALID_LINK_ID
	.word	KEY_WEP
	.word	.LC8
	.word	EOPNOTSUPP
	.word	KEY_GEM
	.word	KEY_ADD_OR_REPLACE
	.word	BSS_TYPE_STA_BSS
	.word	.LC6
	.word	IEEE80211_KEY_FLAG_PUT_IV_SPACE
	.word	KEY_AES
	.word	KEY_TKIP
	.word	KEY_REMOVE
	.word	.LC7
	.word	.LC5
	.word	.LC4
	.size	wlcore_set_key, .-wlcore_set_key
	.comm	WL12XX_INVALID_LINK_ID,4,4
	.comm	KEY_WEP,4,4
	.comm	KEY_TKIP,4,4
	.comm	KEY_REMOVE,4,4
	.comm	KEY_GEM,4,4
	.comm	KEY_AES,4,4
	.comm	KEY_ADD_OR_REPLACE,4,4
	.comm	IEEE80211_KEY_FLAG_PUT_IV_SPACE,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	DEBUG_MAC80211,4,4
	.comm	DEBUG_CRYPT,4,4
	.comm	BSS_TYPE_STA_BSS,4,4
	.comm	BSS_TYPE_AP_BSS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
