	.file	"extr_ks_wlan_net.c_ks_wlan_get_encode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ks_wlan_get_encode, @function
ks_wlan_get_encode:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rcx
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdx
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	netdev_priv@PLT
	mov	r8d, DWORD PTR EPERM[rip]
	mov	ecx, DWORD PTR [rbx]
	mov	rsi, QWORD PTR SLP_SLEEP[rip]
	and	ecx, DWORD PTR IW_ENCODE_INDEX[rip]
	neg	r8d
	cmp	QWORD PTR [rax], rsi
	je	.L1
	mov	r8d, DWORD PTR 8[rax]
	mov	edi, DWORD PTR IW_ENCODE_DISABLED[rip]
	lea	edx, -1[rcx]
	mov	esi, DWORD PTR IW_ENCODE_RESTRICTED[rip]
	cmp	r8d, 128
	je	.L5
	cmp	r8d, 129
	mov	esi, edi
	cmove	esi, DWORD PTR IW_ENCODE_OPEN[rip]
.L5:
	mov	r8, QWORD PTR 24[rax]
	cmp	edx, 3
	jbe	.L6
	mov	edx, DWORD PTR 12[rax]
	lea	ecx, 1[rdx]
	test	r8, r8
	je	.L7
.L10:
	not	edi
	and	esi, edi
.L7:
	or	ecx, esi
	xor	r8d, r8d
	mov	DWORD PTR [rbx], ecx
	cmp	edx, 3
	jbe	.L9
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r8d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	test	r8, r8
	jne	.L10
	or	ecx, esi
	mov	DWORD PTR [rbx], ecx
.L9:
	mov	rax, QWORD PTR 16[rax]
	movsx	rdx, edx
	mov	ecx, 0
	mov	rdi, rbp
	lea	rax, [rax+rdx*8]
	mov	edx, DWORD PTR [rax]
	mov	esi, DWORD PTR 4[rax]
	cmp	edx, 17
	cmovge	edx, ecx
	mov	DWORD PTR 4[rbx], edx
	call	memcpy@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 24
	xor	r8d, r8d
	mov	eax, r8d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ks_wlan_get_encode, .-ks_wlan_get_encode
	.comm	SLP_SLEEP,8,8
	.comm	IW_ENCODE_RESTRICTED,4,4
	.comm	IW_ENCODE_OPEN,4,4
	.comm	IW_ENCODE_INDEX,4,4
	.comm	IW_ENCODE_DISABLED,4,4
	.comm	EPERM,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_ks_wlan_net.c_ks_wlan_get_encode.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ks_wlan_get_encode, %function
ks_wlan_get_encode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r2
	mov	r5, r3
	bl	netdev_priv
	ldr	r2, .L25
	ldr	r3, .L25+4
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, [r0]
	ldr	ip, [r4]
	cmp	r2, r3
	and	ip, ip, r1
	beq	.L21
	ldr	r3, [r0, #4]
	ldr	r2, .L25+8
	cmp	r3, #128
	ldr	lr, [r2]
	sub	r1, ip, #1
	beq	.L4
	cmp	r3, #129
	movne	r2, lr
	beq	.L22
	cmp	r1, #3
	ldr	r3, [r0, #16]
	bls	.L6
.L24:
	ldr	r1, [r0, #8]
	cmp	r3, #0
	add	ip, r1, #1
	bne	.L10
	orr	ip, r2, ip
	cmp	r1, #3
	str	ip, [r4]
	bls	.L9
.L13:
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L6:
	cmp	r3, #0
	beq	.L23
.L10:
	bic	r2, r2, lr
	orr	ip, r2, ip
	cmp	r1, #3
	str	ip, [r4]
	bhi	.L13
.L9:
	ldr	r3, [r0, #12]
	mov	r0, r5
	ldr	r2, [r3, r1, lsl #3]
	add	r1, r3, r1, lsl #3
	cmp	r2, #17
	movge	r2, #0
	ldr	r1, [r1, #4]
	str	r2, [r4, #4]
	bl	memcpy
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L22:
	ldr	r3, .L25+12
	cmp	r1, #3
	ldr	r2, [r3]
	ldr	r3, [r0, #16]
	bls	.L6
	b	.L24
.L4:
	ldr	r3, .L25+16
	cmp	r1, #3
	ldr	r2, [r3]
	ldr	r3, [r0, #16]
	bls	.L6
	b	.L24
.L21:
	ldr	r3, .L25+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, pc}
.L23:
	orr	ip, ip, r2
	str	ip, [r4]
	b	.L9
.L26:
	.align	2
.L25:
	.word	IW_ENCODE_INDEX
	.word	SLP_SLEEP
	.word	IW_ENCODE_DISABLED
	.word	IW_ENCODE_OPEN
	.word	IW_ENCODE_RESTRICTED
	.word	EPERM
	.size	ks_wlan_get_encode, .-ks_wlan_get_encode
	.comm	SLP_SLEEP,4,4
	.comm	IW_ENCODE_RESTRICTED,4,4
	.comm	IW_ENCODE_OPEN,4,4
	.comm	IW_ENCODE_INDEX,4,4
	.comm	IW_ENCODE_DISABLED,4,4
	.comm	EPERM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
