	.file	"extr_hw.c___orinoco_hw_setup_enc.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	__orinoco_hw_setup_enc
	.type	__orinoco_hw_setup_enc, @function
__orinoco_hw_setup_enc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	rax, QWORD PTR ORINOCO_ALG_WEP[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	lea	rbp, 48[rdi]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	cmp	QWORD PTR [rdi], rax
	je	.L27
.L2:
	mov	rdx, QWORD PTR 24[rbx]
	mov	ecx, DWORD PTR HERMES_AUTH_SHARED_KEY[rip]
	mov	r12d, 2
	test	rdx, rdx
	cmove	ecx, DWORD PTR HERMES_AUTH_OPEN[rip]
	cmp	QWORD PTR 40[rbx], 0
	jne	.L5
	xor	r12d, r12d
	mov	rax, QWORD PTR ORINOCO_ALG_WEP[rip]
	cmp	QWORD PTR [rbx], rax
	sete	r12b
.L5:
	mov	eax, DWORD PTR 8[rbx]
	cmp	eax, 129
	jle	.L28
	cmp	eax, 130
	jne	.L15
	mov	esi, DWORD PTR USER_BAP[rip]
	mov	rax, QWORD PTR ORINOCO_ALG_WEP[rip]
	cmp	QWORD PTR [rbx], rax
	je	.L29
.L9:
	mov	edx, DWORD PTR HERMES_RID_CNFWEPENABLED_AGERE[rip]
	mov	ecx, r12d
	mov	rdi, rbp
	call	hermes_write_wordrec@PLT
	test	eax, eax
	jne	.L1
	mov	eax, DWORD PTR 32[rbx]
	test	eax, eax
	je	.L1
	mov	ecx, DWORD PTR 12[rbx]
	mov	edx, DWORD PTR HERMES_RID_CNFSETWPAAUTHMGMTSUITE_AGERE[rip]
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L28:
	cmp	eax, 127
	jg	.L7
.L15:
	xor	eax, eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	rsi, QWORD PTR ORINOCO_ALG_WEP[rip]
	xor	r12d, r12d
	cmp	QWORD PTR [rbx], rsi
	je	.L30
.L10:
	mov	eax, DWORD PTR NL80211_IFTYPE_MONITOR[rip]
	cmp	DWORD PTR 16[rbx], eax
	je	.L31
.L13:
	mov	edx, DWORD PTR HERMES_RID_CNFWEPFLAGS_INTERSIL[rip]
	mov	ecx, r12d
.L25:
	mov	esi, DWORD PTR USER_BAP[rip]
	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	hermes_write_wordrec@PLT
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	call	__orinoco_hw_setup_wepkeys@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L31:
	or	r12d, DWORD PTR HERMES_WEP_HOST_DECRYPT[rip]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L29:
	mov	edx, DWORD PTR HERMES_RID_CNFAUTHENTICATION_AGERE[rip]
	mov	rdi, rbp
	call	hermes_write_wordrec@PLT
	mov	esi, DWORD PTR USER_BAP[rip]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L30:
	mov	r12d, DWORD PTR HERMES_WEP_PRIVACY_INVOKED[rip]
	cmp	eax, 128
	je	.L17
	test	rdx, rdx
	je	.L11
.L17:
	or	r12d, DWORD PTR HERMES_WEP_EXCL_UNENCRYPTED[rip]
.L11:
	mov	edx, DWORD PTR HERMES_RID_CNFAUTHENTICATION[rip]
	mov	esi, DWORD PTR USER_BAP[rip]
	mov	rdi, rbp
	call	hermes_write_wordrec@PLT
	test	eax, eax
	je	.L10
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	__orinoco_hw_setup_enc, .-__orinoco_hw_setup_enc
	.comm	USER_BAP,4,4
	.comm	ORINOCO_ALG_WEP,8,8
	.comm	NL80211_IFTYPE_MONITOR,4,4
	.comm	HERMES_WEP_PRIVACY_INVOKED,4,4
	.comm	HERMES_WEP_HOST_DECRYPT,4,4
	.comm	HERMES_WEP_EXCL_UNENCRYPTED,4,4
	.comm	HERMES_RID_CNFWEPFLAGS_INTERSIL,4,4
	.comm	HERMES_RID_CNFWEPENABLED_AGERE,4,4
	.comm	HERMES_RID_CNFSETWPAAUTHMGMTSUITE_AGERE,4,4
	.comm	HERMES_RID_CNFAUTHENTICATION_AGERE,4,4
	.comm	HERMES_RID_CNFAUTHENTICATION,4,4
	.comm	HERMES_AUTH_SHARED_KEY,4,4
	.comm	HERMES_AUTH_OPEN,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_hw.c___orinoco_hw_setup_enc.c"
	.text
	.align	2
	.global	__orinoco_hw_setup_enc
	.syntax unified
	.arm
	.fpu softvfp
	.type	__orinoco_hw_setup_enc, %function
__orinoco_hw_setup_enc:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r6, .L30
	ldr	r2, [r5], #28
	ldr	r3, [r6]
	mov	r4, r0
	cmp	r2, r3
	beq	.L26
.L2:
	ldr	r1, [r4, #16]
	ldr	r2, [r4, #24]
	cmp	r1, #0
	ldrne	r3, .L30+4
	ldreq	r3, .L30+8
	cmp	r2, #0
	ldreq	r7, [r4]
	ldreq	r2, [r6]
	movne	r7, #2
	subeq	r7, r7, r2
	clzeq	r7, r7
	ldr	r2, [r4, #4]
	lsreq	r7, r7, #5
	cmp	r2, #129
	ldr	r3, [r3]
	ble	.L27
	cmp	r2, #130
	bne	.L14
	ldr	r2, [r6]
	ldr	r1, [r4]
	ldr	r6, .L30+12
	cmp	r1, r2
	ldr	r1, [r6]
	beq	.L28
.L9:
	ldr	r2, .L30+16
	mov	r3, r7
	mov	r0, r5
	ldr	r2, [r2]
	bl	hermes_write_wordrec
	cmp	r0, #0
	popne	{r4, r5, r6, r7, r8, pc}
	ldr	r0, [r4, #20]
	cmp	r0, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r2, .L30+20
	ldr	r3, [r4, #8]
	b	.L24
.L27:
	cmp	r2, #127
	bgt	.L7
.L14:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	ldr	r0, [r6]
	ldr	ip, [r4]
	cmp	ip, r0
	beq	.L29
	mov	r7, #0
	ldr	r6, .L30+12
.L10:
	ldr	r3, .L30+24
	ldr	r2, [r4, #12]
	ldr	r3, [r3]
	cmp	r2, r3
	ldreq	r3, .L30+28
	ldr	r2, .L30+32
	ldreq	r3, [r3]
	orreq	r7, r7, r3
	mov	r3, r7
.L24:
	mov	r0, r5
	ldr	r1, [r6]
	ldr	r2, [r2]
	pop	{r4, r5, r6, r7, r8, lr}
	b	hermes_write_wordrec
.L26:
	bl	__orinoco_hw_setup_wepkeys
	b	.L2
.L28:
	ldr	r2, .L30+36
	mov	r0, r5
	ldr	r2, [r2]
	bl	hermes_write_wordrec
	ldr	r1, [r6]
	b	.L9
.L29:
	subs	r1, r1, #0
	movne	r1, #1
	cmp	r2, #128
	movne	r2, r1
	orreq	r2, r1, #1
	cmp	r2, #0
	ldrne	r2, .L30+40
	ldr	r1, .L30+44
	ldrne	r2, [r2]
	ldr	r7, [r1]
	ldr	r6, .L30+12
	orrne	r7, r7, r2
	ldr	r2, .L30+48
	mov	r0, r5
	ldr	r2, [r2]
	ldr	r1, [r6]
	bl	hermes_write_wordrec
	cmp	r0, #0
	beq	.L10
	pop	{r4, r5, r6, r7, r8, pc}
.L31:
	.align	2
.L30:
	.word	ORINOCO_ALG_WEP
	.word	HERMES_AUTH_SHARED_KEY
	.word	HERMES_AUTH_OPEN
	.word	USER_BAP
	.word	HERMES_RID_CNFWEPENABLED_AGERE
	.word	HERMES_RID_CNFSETWPAAUTHMGMTSUITE_AGERE
	.word	NL80211_IFTYPE_MONITOR
	.word	HERMES_WEP_HOST_DECRYPT
	.word	HERMES_RID_CNFWEPFLAGS_INTERSIL
	.word	HERMES_RID_CNFAUTHENTICATION_AGERE
	.word	HERMES_WEP_EXCL_UNENCRYPTED
	.word	HERMES_WEP_PRIVACY_INVOKED
	.word	HERMES_RID_CNFAUTHENTICATION
	.size	__orinoco_hw_setup_enc, .-__orinoco_hw_setup_enc
	.comm	USER_BAP,4,4
	.comm	ORINOCO_ALG_WEP,4,4
	.comm	NL80211_IFTYPE_MONITOR,4,4
	.comm	HERMES_WEP_PRIVACY_INVOKED,4,4
	.comm	HERMES_WEP_HOST_DECRYPT,4,4
	.comm	HERMES_WEP_EXCL_UNENCRYPTED,4,4
	.comm	HERMES_RID_CNFWEPFLAGS_INTERSIL,4,4
	.comm	HERMES_RID_CNFWEPENABLED_AGERE,4,4
	.comm	HERMES_RID_CNFSETWPAAUTHMGMTSUITE_AGERE,4,4
	.comm	HERMES_RID_CNFAUTHENTICATION_AGERE,4,4
	.comm	HERMES_RID_CNFAUTHENTICATION,4,4
	.comm	HERMES_AUTH_SHARED_KEY,4,4
	.comm	HERMES_AUTH_OPEN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
