	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___orinoco_hw_setup_enc         ## -- Begin function __orinoco_hw_setup_enc
	.p2align	4, 0x90
___orinoco_hw_setup_enc:                ## @__orinoco_hw_setup_enc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_ORINOCO_ALG_WEP@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	___orinoco_hw_setup_wepkeys
LBB0_2:
	movq	24(%rbx), %rax
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:
	movq	_HERMES_AUTH_OPEN@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_3:
	movq	_HERMES_AUTH_SHARED_KEY@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	$2, %r15d
	cmpq	$0, 40(%rbx)
	jne	LBB0_7
## %bb.6:
	movq	(%rbx), %rdx
	xorl	%r15d, %r15d
	cmpq	(%r12), %rdx
	sete	%r15b
LBB0_7:
	leaq	48(%rbx), %r14
	movl	(%rcx), %ecx
	movl	8(%rbx), %edx
	leal	-128(%rdx), %esi
	cmpl	$2, %esi
	jae	LBB0_8
## %bb.14:
	movq	(%rbx), %rsi
	xorl	%r15d, %r15d
	movl	$0, %r13d
	cmpq	(%r12), %rsi
	jne	LBB0_16
## %bb.15:
	xorl	%r13d, %r13d
	cmpl	$128, %edx
	movq	_HERMES_WEP_EXCL_UNENCRYPTED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmovel	%edx, %r13d
	testq	%rax, %rax
	movq	_HERMES_WEP_PRIVACY_INVOKED@GOTPCREL(%rip), %rax
	cmovnel	%edx, %r13d
	orl	(%rax), %r13d
	movq	_USER_BAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HERMES_RID_CNFAUTHENTICATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_hermes_write_wordrec
	testl	%eax, %eax
	jne	LBB0_21
LBB0_16:
	movl	16(%rbx), %eax
	movq	_NL80211_IFTYPE_MONITOR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_18
## %bb.17:
	movq	_HERMES_WEP_HOST_DECRYPT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_18:
	orl	%r13d, %r15d
	movq	_USER_BAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HERMES_RID_CNFWEPFLAGS_INTERSIL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r15d, %ecx
LBB0_19:
	callq	_hermes_write_wordrec
	testl	%eax, %eax
	jne	LBB0_21
	jmp	LBB0_20
LBB0_8:
	cmpl	$130, %edx
	jne	LBB0_20
## %bb.9:
	movq	(%rbx), %rax
	cmpq	(%r12), %rax
	jne	LBB0_11
## %bb.10:
	movq	_USER_BAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HERMES_RID_CNFAUTHENTICATION_AGERE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_hermes_write_wordrec
LBB0_11:
	movq	_USER_BAP@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_HERMES_RID_CNFWEPENABLED_AGERE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r15d, %ecx
	callq	_hermes_write_wordrec
	testl	%eax, %eax
	jne	LBB0_21
## %bb.12:
	cmpl	$0, 32(%rbx)
	je	LBB0_20
## %bb.13:
	movl	(%r12), %esi
	movq	_HERMES_RID_CNFSETWPAAUTHMGMTSUITE_AGERE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	12(%rbx), %ecx
	movq	%r14, %rdi
	jmp	LBB0_19
LBB0_20:
	xorl	%eax, %eax
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ORINOCO_ALG_WEP,8,3            ## @ORINOCO_ALG_WEP
	.comm	_HERMES_AUTH_SHARED_KEY,4,2     ## @HERMES_AUTH_SHARED_KEY
	.comm	_HERMES_AUTH_OPEN,4,2           ## @HERMES_AUTH_OPEN
	.comm	_USER_BAP,4,2                   ## @USER_BAP
	.comm	_HERMES_RID_CNFAUTHENTICATION_AGERE,4,2 ## @HERMES_RID_CNFAUTHENTICATION_AGERE
	.comm	_HERMES_RID_CNFWEPENABLED_AGERE,4,2 ## @HERMES_RID_CNFWEPENABLED_AGERE
	.comm	_HERMES_RID_CNFSETWPAAUTHMGMTSUITE_AGERE,4,2 ## @HERMES_RID_CNFSETWPAAUTHMGMTSUITE_AGERE
	.comm	_HERMES_WEP_PRIVACY_INVOKED,4,2 ## @HERMES_WEP_PRIVACY_INVOKED
	.comm	_HERMES_WEP_EXCL_UNENCRYPTED,4,2 ## @HERMES_WEP_EXCL_UNENCRYPTED
	.comm	_HERMES_RID_CNFAUTHENTICATION,4,2 ## @HERMES_RID_CNFAUTHENTICATION
	.comm	_NL80211_IFTYPE_MONITOR,4,2     ## @NL80211_IFTYPE_MONITOR
	.comm	_HERMES_WEP_HOST_DECRYPT,4,2    ## @HERMES_WEP_HOST_DECRYPT
	.comm	_HERMES_RID_CNFWEPFLAGS_INTERSIL,4,2 ## @HERMES_RID_CNFWEPFLAGS_INTERSIL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___orinoco_hw_setup_enc         ; -- Begin function __orinoco_hw_setup_enc
	.p2align	2
___orinoco_hw_setup_enc:                ; @__orinoco_hw_setup_enc
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	mov	x19, x0
	ldr	x8, [x19], #48
Lloh0:
	adrp	x22, _ORINOCO_ALG_WEP@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ORINOCO_ALG_WEP@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	___orinoco_hw_setup_wepkeys
LBB0_2:
	ldr	x8, [x20, #24]
Lloh2:
	adrp	x9, _HERMES_AUTH_OPEN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HERMES_AUTH_OPEN@GOTPAGEOFF]
Lloh4:
	adrp	x10, _HERMES_AUTH_SHARED_KEY@GOTPAGE
Lloh5:
	ldr	x10, [x10, _HERMES_AUTH_SHARED_KEY@GOTPAGEOFF]
	cmp	x8, #0
	csel	x9, x9, x10, eq
	ldr	w3, [x9]
	ldr	x9, [x20, #40]
	cbz	x9, LBB0_4
; %bb.3:
	mov	w21, #2
	b	LBB0_5
LBB0_4:
	ldr	x9, [x20]
	ldr	x10, [x22]
	cmp	x9, x10
	cset	w21, eq
LBB0_5:
	ldr	w9, [x20, #8]
	sub	w10, w9, #128
	cmp	w10, #2
	b.hs	LBB0_9
; %bb.6:
	ldr	x10, [x20]
	ldr	x11, [x22]
	cmp	x10, x11
	b.ne	LBB0_15
; %bb.7:
	cmp	w9, #128
Lloh6:
	adrp	x9, _HERMES_WEP_PRIVACY_INVOKED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HERMES_WEP_PRIVACY_INVOKED@GOTPAGEOFF]
	ccmp	x8, #0, #0, ne
Lloh8:
	ldr	w21, [x9]
Lloh9:
	adrp	x8, _HERMES_WEP_EXCL_UNENCRYPTED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HERMES_WEP_EXCL_UNENCRYPTED@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	csel	w22, w8, wzr, ne
Lloh12:
	adrp	x8, _USER_BAP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _USER_BAP@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _HERMES_RID_CNFAUTHENTICATION@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HERMES_RID_CNFAUTHENTICATION@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hermes_write_wordrec
	cbnz	w0, LBB0_19
; %bb.8:
	orr	w8, w22, w21
	b	LBB0_16
LBB0_9:
	cmp	w9, #130
	b.ne	LBB0_18
; %bb.10:
	ldr	x8, [x20]
	ldr	x9, [x22]
Lloh18:
	adrp	x22, _USER_BAP@GOTPAGE
Lloh19:
	ldr	x22, [x22, _USER_BAP@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.11:
	ldr	w1, [x22]
Lloh20:
	adrp	x8, _HERMES_RID_CNFAUTHENTICATION_AGERE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _HERMES_RID_CNFAUTHENTICATION_AGERE@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hermes_write_wordrec
LBB0_12:
	ldr	w1, [x22]
Lloh23:
	adrp	x8, _HERMES_RID_CNFWEPENABLED_AGERE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _HERMES_RID_CNFWEPENABLED_AGERE@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x21
	bl	_hermes_write_wordrec
	cbnz	w0, LBB0_19
; %bb.13:
	ldr	w8, [x20, #32]
	cbz	w8, LBB0_18
; %bb.14:
	ldr	w1, [x22]
Lloh26:
	adrp	x8, _HERMES_RID_CNFSETWPAAUTHMGMTSUITE_AGERE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _HERMES_RID_CNFSETWPAAUTHMGMTSUITE_AGERE@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	ldr	w3, [x20, #12]
	b	LBB0_17
LBB0_15:
	mov	w8, #0
LBB0_16:
	ldr	w9, [x20, #16]
Lloh29:
	adrp	x10, _NL80211_IFTYPE_MONITOR@GOTPAGE
Lloh30:
	ldr	x10, [x10, _NL80211_IFTYPE_MONITOR@GOTPAGEOFF]
Lloh31:
	ldr	w10, [x10]
Lloh32:
	adrp	x11, _HERMES_WEP_HOST_DECRYPT@GOTPAGE
Lloh33:
	ldr	x11, [x11, _HERMES_WEP_HOST_DECRYPT@GOTPAGEOFF]
Lloh34:
	ldr	w11, [x11]
	cmp	w9, w10
	csel	w9, w11, wzr, eq
	orr	w3, w9, w8
Lloh35:
	adrp	x8, _USER_BAP@GOTPAGE
Lloh36:
	ldr	x8, [x8, _USER_BAP@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
Lloh38:
	adrp	x8, _HERMES_RID_CNFWEPFLAGS_INTERSIL@GOTPAGE
Lloh39:
	ldr	x8, [x8, _HERMES_RID_CNFWEPFLAGS_INTERSIL@GOTPAGEOFF]
Lloh40:
	ldr	w2, [x8]
LBB0_17:
	mov	x0, x19
	bl	_hermes_write_wordrec
	cbnz	w0, LBB0_19
LBB0_18:
	mov	w0, #0
LBB0_19:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_ORINOCO_ALG_WEP,8,3            ; @ORINOCO_ALG_WEP
	.comm	_HERMES_AUTH_SHARED_KEY,4,2     ; @HERMES_AUTH_SHARED_KEY
	.comm	_HERMES_AUTH_OPEN,4,2           ; @HERMES_AUTH_OPEN
	.comm	_USER_BAP,4,2                   ; @USER_BAP
	.comm	_HERMES_RID_CNFAUTHENTICATION_AGERE,4,2 ; @HERMES_RID_CNFAUTHENTICATION_AGERE
	.comm	_HERMES_RID_CNFWEPENABLED_AGERE,4,2 ; @HERMES_RID_CNFWEPENABLED_AGERE
	.comm	_HERMES_RID_CNFSETWPAAUTHMGMTSUITE_AGERE,4,2 ; @HERMES_RID_CNFSETWPAAUTHMGMTSUITE_AGERE
	.comm	_HERMES_WEP_PRIVACY_INVOKED,4,2 ; @HERMES_WEP_PRIVACY_INVOKED
	.comm	_HERMES_WEP_EXCL_UNENCRYPTED,4,2 ; @HERMES_WEP_EXCL_UNENCRYPTED
	.comm	_HERMES_RID_CNFAUTHENTICATION,4,2 ; @HERMES_RID_CNFAUTHENTICATION
	.comm	_NL80211_IFTYPE_MONITOR,4,2     ; @NL80211_IFTYPE_MONITOR
	.comm	_HERMES_WEP_HOST_DECRYPT,4,2    ; @HERMES_WEP_HOST_DECRYPT
	.comm	_HERMES_RID_CNFWEPFLAGS_INTERSIL,4,2 ; @HERMES_RID_CNFWEPFLAGS_INTERSIL
.subsections_via_symbols
