	.file	"extr_libipw_wx.c_libipw_wx_get_encodeext.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	libipw_wx_get_encodeext
	.type	libipw_wx_get_encodeext, @function
libipw_wx_get_encodeext:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR [rdx]
	sub	eax, 32
	js	.L21
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	eax, DWORD PTR 4[rdx]
	and	eax, DWORD PTR IW_ENCODE_INDEX[rip]
	jne	.L22
	mov	ebp, DWORD PTR 8[rdi]
	mov	eax, DWORD PTR [r12]
	test	DWORD PTR IW_ENCODE_EXT_GROUP_KEY[rip], eax
	jne	.L7
.L23:
	mov	rax, QWORD PTR IW_ENCODE_ALG_WEP[rip]
	cmp	QWORD PTR 8[r12], rax
	je	.L7
	test	ebp, ebp
	jne	.L12
	mov	rax, QWORD PTR IW_MODE_INFRA[rip]
	cmp	QWORD PTR 0[r13], rax
	je	.L7
.L12:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	jle	.L12
	cmp	DWORD PTR WEP_KEYS[rip], eax
	lea	ebp, -1[rax]
	jl	.L12
	mov	eax, DWORD PTR [r12]
	test	DWORD PTR IW_ENCODE_EXT_GROUP_KEY[rip], eax
	je	.L23
	.p2align 4,,10
	.p2align 3
.L7:
	lea	eax, 1[rbp]
	mov	edx, 32
	xor	esi, esi
	mov	rdi, r12
	mov	DWORD PTR 4[rbx], eax
	call	memset@PLT
	mov	eax, DWORD PTR 40[r13]
	test	eax, eax
	je	.L24
	mov	rax, QWORD PTR 16[r13]
	movsx	rbp, ebp
	mov	rax, QWORD PTR [rax+rbp*8]
	cmp	rax, QWORD PTR SEC_ALG_WEP[rip]
	je	.L25
	cmp	rax, QWORD PTR SEC_ALG_TKIP[rip]
	je	.L26
	cmp	rax, QWORD PTR SEC_ALG_CCMP[rip]
	jne	.L12
	mov	rax, QWORD PTR IW_ENCODE_ALG_CCMP[rip]
	mov	QWORD PTR 8[r12], rax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L24:
	mov	QWORD PTR 16[r12], 0
	mov	rdx, QWORD PTR IW_ENCODE_ALG_NONE[rip]
	mov	QWORD PTR 8[r12], rdx
	mov	edx, DWORD PTR IW_ENCODE_DISABLED[rip]
	or	DWORD PTR 4[rbx], edx
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -40
	.cfi_offset 6, -32
	.cfi_offset 12, -24
	.cfi_offset 13, -16
	mov	rax, QWORD PTR IW_ENCODE_ALG_WEP[rip]
	mov	QWORD PTR 8[r12], rax
.L10:
	mov	rax, QWORD PTR 32[r13]
	mov	edi, DWORD PTR 24[r12]
	mov	rdx, QWORD PTR [rax+rbp*8]
	mov	rax, QWORD PTR 24[r13]
	mov	QWORD PTR 16[r12], rdx
	mov	esi, DWORD PTR [rax+rbp*4]
	call	memcpy@PLT
	mov	eax, DWORD PTR IW_ENCODE_ENABLED[rip]
	or	DWORD PTR 4[rbx], eax
	xor	eax, eax
	cmp	QWORD PTR 16[r12], 0
	je	.L1
	mov	rdx, QWORD PTR 8[r12]
	cmp	rdx, QWORD PTR IW_ENCODE_ALG_TKIP[rip]
	je	.L13
	cmp	rdx, QWORD PTR IW_ENCODE_ALG_CCMP[rip]
	jne	.L1
.L13:
	mov	eax, DWORD PTR IW_ENCODE_EXT_TX_SEQ_VALID[rip]
	or	DWORD PTR [r12], eax
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L26:
	mov	rax, QWORD PTR IW_ENCODE_ALG_TKIP[rip]
	mov	QWORD PTR 8[r12], rax
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	libipw_wx_get_encodeext, .-libipw_wx_get_encodeext
	.comm	WEP_KEYS,4,4
	.comm	SEC_ALG_WEP,8,8
	.comm	SEC_ALG_TKIP,8,8
	.comm	SEC_ALG_CCMP,8,8
	.comm	IW_MODE_INFRA,8,8
	.comm	IW_ENCODE_INDEX,4,4
	.comm	IW_ENCODE_EXT_TX_SEQ_VALID,4,4
	.comm	IW_ENCODE_EXT_GROUP_KEY,4,4
	.comm	IW_ENCODE_ENABLED,4,4
	.comm	IW_ENCODE_DISABLED,4,4
	.comm	IW_ENCODE_ALG_WEP,8,8
	.comm	IW_ENCODE_ALG_TKIP,8,8
	.comm	IW_ENCODE_ALG_NONE,8,8
	.comm	IW_ENCODE_ALG_CCMP,8,8
	.comm	EINVAL,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_libipw_wx.c_libipw_wx_get_encodeext.c"
	.text
	.align	2
	.global	libipw_wx_get_encodeext
	.syntax unified
	.arm
	.fpu softvfp
	.type	libipw_wx_get_encodeext, %function
libipw_wx_get_encodeext:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r2
	ldr	r2, [r2]
	cmp	r2, #16
	bmi	.L12
	mov	r6, r3
	ldr	r3, .L24
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	mov	r7, r0
	and	r2, r2, r3
	cmp	r2, #0
	bne	.L20
	ldr	r5, [r0, #4]
.L6:
	ldr	r3, .L24+4
	ldr	r2, [r6]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L7
	ldr	r3, .L24+8
	ldr	r2, [r6, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L7
	cmp	r5, #0
	bne	.L12
	ldr	r3, .L24+12
	ldr	r2, [r7]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L7
.L12:
	ldr	r3, .L24+16
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L20:
	ble	.L12
	ldr	r3, .L24+20
	ldr	r3, [r3]
	cmp	r3, r2
	subge	r5, r2, #1
	bge	.L6
	b	.L12
.L7:
	add	r3, r5, #1
	mov	r2, #16
	mov	r1, #0
	mov	r0, r6
	str	r3, [r4, #4]
	bl	memset
	ldr	r0, [r7, #20]
	cmp	r0, #0
	beq	.L21
	ldr	r3, [r7, #8]
	ldr	r2, .L24+24
	ldr	r3, [r3, r5, lsl #2]
	ldr	r2, [r2]
	lsl	r5, r5, #2
	cmp	r3, r2
	beq	.L22
	ldr	r2, .L24+28
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L23
	ldr	r2, .L24+32
	ldr	r2, [r2]
	cmp	r3, r2
	bne	.L12
	ldr	r3, .L24+36
	ldr	r3, [r3]
	str	r3, [r6, #4]
	b	.L10
.L21:
	ldr	r3, .L24+40
	ldr	r2, .L24+44
	ldr	r1, [r3]
	ldr	r3, [r4, #4]
	ldr	r2, [r2]
	orr	r3, r3, r1
	str	r0, [r6, #8]
	str	r2, [r6, #4]
	str	r3, [r4, #4]
	pop	{r4, r5, r6, r7, r8, pc}
.L22:
	ldr	r3, .L24+8
	ldr	r3, [r3]
	str	r3, [r6, #4]
.L10:
	ldr	r2, [r7, #16]
	ldr	r3, [r7, #12]
	ldr	r2, [r2, r5]
	ldr	r1, [r3, r5]
	mov	r0, #0
	str	r2, [r6, #8]
	bl	memcpy
	ldr	r2, .L24+48
	ldr	r3, [r4, #4]
	ldr	r0, [r6, #8]
	ldr	r2, [r2]
	cmp	r0, #0
	orr	r3, r3, r2
	str	r3, [r4, #4]
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r2, .L24+52
	ldr	r3, [r6, #4]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L13
	ldr	r2, .L24+36
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L13
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	ldr	r2, .L24+56
	ldr	r3, [r6]
	ldr	r2, [r2]
	mov	r0, #0
	orr	r3, r3, r2
	str	r3, [r6]
	pop	{r4, r5, r6, r7, r8, pc}
.L23:
	ldr	r3, .L24+52
	ldr	r3, [r3]
	str	r3, [r6, #4]
	b	.L10
.L25:
	.align	2
.L24:
	.word	IW_ENCODE_INDEX
	.word	IW_ENCODE_EXT_GROUP_KEY
	.word	IW_ENCODE_ALG_WEP
	.word	IW_MODE_INFRA
	.word	EINVAL
	.word	WEP_KEYS
	.word	SEC_ALG_WEP
	.word	SEC_ALG_TKIP
	.word	SEC_ALG_CCMP
	.word	IW_ENCODE_ALG_CCMP
	.word	IW_ENCODE_DISABLED
	.word	IW_ENCODE_ALG_NONE
	.word	IW_ENCODE_ENABLED
	.word	IW_ENCODE_ALG_TKIP
	.word	IW_ENCODE_EXT_TX_SEQ_VALID
	.size	libipw_wx_get_encodeext, .-libipw_wx_get_encodeext
	.comm	WEP_KEYS,4,4
	.comm	SEC_ALG_WEP,4,4
	.comm	SEC_ALG_TKIP,4,4
	.comm	SEC_ALG_CCMP,4,4
	.comm	IW_MODE_INFRA,4,4
	.comm	IW_ENCODE_INDEX,4,4
	.comm	IW_ENCODE_EXT_TX_SEQ_VALID,4,4
	.comm	IW_ENCODE_EXT_GROUP_KEY,4,4
	.comm	IW_ENCODE_ENABLED,4,4
	.comm	IW_ENCODE_DISABLED,4,4
	.comm	IW_ENCODE_ALG_WEP,4,4
	.comm	IW_ENCODE_ALG_TKIP,4,4
	.comm	IW_ENCODE_ALG_NONE,4,4
	.comm	IW_ENCODE_ALG_CCMP,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
