	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw2100_configure_security
_ipw2100_configure_security:            ## @ipw2100_configure_security
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_STATUS_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_1
## %bb.2:
	movl	%esi, %r14d
	movq	%rdi, %r15
	testl	%esi, %esi
	je	LBB0_3
LBB0_4:
	movq	8(%r15), %rax
	cmpq	$0, 24(%rax)
	movq	_IPW_AUTH_OPEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	je	LBB0_5
## %bb.6:
	movl	(%rax), %ecx
	movq	_SEC_AUTH_MODE@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_12
## %bb.7:
	movq	8(%rax), %rdx
	movq	_WLAN_AUTH_SHARED_KEY@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rdx
	jne	LBB0_9
## %bb.8:
	movq	_IPW_AUTH_SHARED@GOTPCREL(%rip), %rdx
	jmp	LBB0_11
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_44
LBB0_3:
	movq	%r15, %rdi
	callq	_ipw2100_disable_adapter
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_44
	jmp	LBB0_4
LBB0_5:
	movq	_SEC_LEVEL_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	jmp	LBB0_19
LBB0_9:
	movq	_WLAN_AUTH_LEAP@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rdx
	jne	LBB0_12
## %bb.10:
	movq	_IPW_AUTH_LEAP_CISCO_ID@GOTPCREL(%rip), %rdx
LBB0_11:
	movl	(%rdx), %esi
LBB0_12:
	movq	_SEC_LEVEL@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	jne	LBB0_13
## %bb.14:
	movq	_SEC_LEVEL_0@GOTPCREL(%rip), %rdx
	jmp	LBB0_15
LBB0_13:
	leaq	16(%rax), %rdx
LBB0_15:
	movl	(%rdx), %edx
	movq	_SEC_UNICAST_GROUP@GOTPCREL(%rip), %rdi
	testl	%ecx, (%rdi)
	je	LBB0_16
## %bb.17:
	movl	20(%rax), %ecx
	jmp	LBB0_18
LBB0_16:
	xorl	%ecx, %ecx
LBB0_18:
	movq	%r15, %rdi
LBB0_19:
	movl	$1, %r8d
	callq	_ipw2100_set_security_information
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_20
LBB0_42:
	testl	%r14d, %r14d
	jne	LBB0_44
## %bb.43:
	movq	%r15, %rdi
	callq	_ipw2100_enable_adapter
LBB0_44:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	8(%r15), %rcx
	cmpq	$0, 24(%rcx)
	je	LBB0_39
## %bb.21:
	movq	40(%rcx), %rax
	movl	(%rax), %eax
	testb	$1, (%rcx)
	jne	LBB0_23
## %bb.22:
	movq	_WEP_KEY_LEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_memset
	movq	8(%r15), %rcx
	movq	32(%rcx), %rax
	movq	$0, (%rax)
	jmp	LBB0_25
LBB0_23:
	movq	32(%rcx), %rcx
	movq	(%rcx), %rcx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	movl	$1, %r8d
	callq	_ipw2100_set_key
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_42
## %bb.24:
	movq	8(%r15), %rcx
LBB0_25:
	testb	$2, (%rcx)
	movq	40(%rcx), %rax
	movl	4(%rax), %eax
	jne	LBB0_26
## %bb.28:
	movq	_WEP_KEY_LEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_memset
	movq	8(%r15), %rcx
	movq	32(%rcx), %rax
	movq	$0, 8(%rax)
	jmp	LBB0_29
LBB0_26:
	movq	32(%rcx), %rcx
	movq	8(%rcx), %rcx
	movq	%r15, %rdi
	movl	$1, %esi
	movl	%eax, %edx
	movl	$1, %r8d
	callq	_ipw2100_set_key
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_42
## %bb.27:
	movq	8(%r15), %rcx
LBB0_29:
	testb	$4, (%rcx)
	movq	40(%rcx), %rax
	movl	8(%rax), %eax
	jne	LBB0_30
## %bb.32:
	movq	_WEP_KEY_LEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_memset
	movq	8(%r15), %rcx
	movq	32(%rcx), %rax
	movq	$0, 16(%rax)
	jmp	LBB0_33
LBB0_30:
	movq	32(%rcx), %rcx
	movq	16(%rcx), %rcx
	movq	%r15, %rdi
	movl	$2, %esi
	movl	%eax, %edx
	movl	$1, %r8d
	callq	_ipw2100_set_key
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_42
## %bb.31:
	movq	8(%r15), %rcx
LBB0_33:
	testb	$8, (%rcx)
	movq	40(%rcx), %rax
	movl	12(%rax), %eax
	jne	LBB0_34
## %bb.36:
	movq	_WEP_KEY_LEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_memset
	movq	8(%r15), %rax
	movq	32(%rax), %rcx
	movq	$0, 24(%rcx)
	jmp	LBB0_37
LBB0_34:
	movq	32(%rcx), %rcx
	movq	24(%rcx), %rcx
	movq	%r15, %rdi
	movl	$3, %esi
	movl	%eax, %edx
	movl	$1, %r8d
	callq	_ipw2100_set_key
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_42
## %bb.35:
	movq	8(%r15), %rax
LBB0_37:
	movl	48(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_ipw2100_set_key_index
	movq	8(%r15), %rax
	cmpq	$0, 24(%rax)
	je	LBB0_39
## %bb.38:
	movq	_IPW_PRIVACY_CAPABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_40
LBB0_39:
	xorl	%esi, %esi
LBB0_40:
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_ipw2100_set_wep_flags
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_42
## %bb.41:
	movq	_STATUS_SECURITY_UPDATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_42
	.cfi_endproc
                                        ## -- End function
	.comm	_STATUS_RUNNING,4,2             ## @STATUS_RUNNING
	.comm	_IPW_AUTH_OPEN,4,2              ## @IPW_AUTH_OPEN
	.comm	_SEC_LEVEL_0,4,2                ## @SEC_LEVEL_0
	.comm	_SEC_AUTH_MODE,4,2              ## @SEC_AUTH_MODE
	.comm	_WLAN_AUTH_SHARED_KEY,8,3       ## @WLAN_AUTH_SHARED_KEY
	.comm	_IPW_AUTH_SHARED,4,2            ## @IPW_AUTH_SHARED
	.comm	_WLAN_AUTH_LEAP,8,3             ## @WLAN_AUTH_LEAP
	.comm	_IPW_AUTH_LEAP_CISCO_ID,4,2     ## @IPW_AUTH_LEAP_CISCO_ID
	.comm	_SEC_LEVEL,4,2                  ## @SEC_LEVEL
	.comm	_SEC_UNICAST_GROUP,4,2          ## @SEC_UNICAST_GROUP
	.comm	_WEP_KEY_LEN,4,2                ## @WEP_KEY_LEN
	.comm	_IPW_PRIVACY_CAPABLE,4,2        ## @IPW_PRIVACY_CAPABLE
	.comm	_STATUS_SECURITY_UPDATED,4,2    ## @STATUS_SECURITY_UPDATED
	.no_dead_strip	_ipw2100_configure_security
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw2100_configure_security
_ipw2100_configure_security:            ; @ipw2100_configure_security
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _STATUS_RUNNING@GOTPAGE
Lloh1:
	ldr	x9, [x9, _STATUS_RUNNING@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	cbz	w1, LBB0_7
LBB0_2:
	ldr	x8, [x19, #8]
	ldr	x9, [x8, #24]
Lloh3:
	adrp	x10, _IPW_AUTH_OPEN@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IPW_AUTH_OPEN@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x10]
	cbz	x9, LBB0_8
; %bb.3:
	ldr	w9, [x8]
Lloh6:
	adrp	x10, _SEC_AUTH_MODE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SEC_AUTH_MODE@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_10
; %bb.4:
	ldr	x10, [x8, #8]
Lloh9:
	adrp	x11, _WLAN_AUTH_SHARED_KEY@GOTPAGE
Lloh10:
	ldr	x11, [x11, _WLAN_AUTH_SHARED_KEY@GOTPAGEOFF]
Lloh11:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_9
; %bb.5:
Lloh12:
	adrp	x10, _IPW_AUTH_SHARED@GOTPAGE
Lloh13:
	ldr	x10, [x10, _IPW_AUTH_SHARED@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x10]
	b	LBB0_10
LBB0_6:
	mov	w21, #0
	b	LBB0_17
LBB0_7:
	mov	x0, x19
	bl	_ipw2100_disable_adapter
	mov	x21, x0
	cbnz	w0, LBB0_17
	b	LBB0_2
LBB0_8:
Lloh15:
	adrp	x8, _SEC_LEVEL_0@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SEC_LEVEL_0@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	b	LBB0_14
LBB0_9:
Lloh18:
	adrp	x11, _WLAN_AUTH_LEAP@GOTPAGE
Lloh19:
	ldr	x11, [x11, _WLAN_AUTH_LEAP@GOTPAGEOFF]
Lloh20:
	ldr	x11, [x11]
Lloh21:
	adrp	x12, _IPW_AUTH_LEAP_CISCO_ID@GOTPAGE
Lloh22:
	ldr	x12, [x12, _IPW_AUTH_LEAP_CISCO_ID@GOTPAGEOFF]
Lloh23:
	ldr	w12, [x12]
	cmp	x10, x11
	csel	w1, w12, w1, eq
LBB0_10:
Lloh24:
	adrp	x10, _SEC_LEVEL@GOTPAGE
Lloh25:
	ldr	x10, [x10, _SEC_LEVEL@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	add	x11, x8, #16
Lloh27:
	adrp	x12, _SEC_LEVEL_0@GOTPAGE
Lloh28:
	ldr	x12, [x12, _SEC_LEVEL_0@GOTPAGEOFF]
	tst	w10, w9
	csel	x10, x12, x11, eq
	ldr	w2, [x10]
Lloh29:
	adrp	x10, _SEC_UNICAST_GROUP@GOTPAGE
Lloh30:
	ldr	x10, [x10, _SEC_UNICAST_GROUP@GOTPAGEOFF]
Lloh31:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_12
; %bb.11:
	ldr	w3, [x8, #20]
	b	LBB0_13
LBB0_12:
	mov	w3, #0
LBB0_13:
	mov	x0, x19
LBB0_14:
	mov	w4, #1
	bl	_ipw2100_set_security_information
	mov	x21, x0
	cbz	w0, LBB0_18
LBB0_15:
	cbnz	w20, LBB0_17
; %bb.16:
	mov	x0, x19
	bl	_ipw2100_enable_adapter
LBB0_17:
	mov	x0, x21
	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
LBB0_18:
	ldr	x9, [x19, #8]
	ldr	x8, [x9, #24]
	cbz	x8, LBB0_37
; %bb.19:
	ldr	x8, [x9, #40]
	ldr	w8, [x8]
	ldrb	w10, [x9]
	tbnz	w10, #0, LBB0_21
; %bb.20:
Lloh32:
	adrp	x9, _WEP_KEY_LEN@GOTPAGE
Lloh33:
	ldr	x9, [x9, _WEP_KEY_LEN@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x9]
	mov	x0, x8
	mov	w1, #0
	bl	_memset
	ldr	x9, [x19, #8]
	ldr	x8, [x9, #32]
	str	xzr, [x8]
	b	LBB0_23
LBB0_21:
	ldr	x9, [x9, #32]
	ldr	x3, [x9]
	mov	x0, x19
	mov	w1, #0
	mov	x2, x8
	mov	w4, #1
	bl	_ipw2100_set_key
	mov	x21, x0
	cbnz	w0, LBB0_15
; %bb.22:
	ldr	x9, [x19, #8]
LBB0_23:
	ldr	x8, [x9, #40]
	ldr	w8, [x8, #4]
	ldrb	w10, [x9]
	tbnz	w10, #1, LBB0_25
; %bb.24:
Lloh35:
	adrp	x9, _WEP_KEY_LEN@GOTPAGE
Lloh36:
	ldr	x9, [x9, _WEP_KEY_LEN@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x9]
	mov	x0, x8
	mov	w1, #0
	bl	_memset
	ldr	x9, [x19, #8]
	ldr	x8, [x9, #32]
	str	xzr, [x8, #8]
	b	LBB0_27
LBB0_25:
	ldr	x9, [x9, #32]
	ldr	x3, [x9, #8]
	mov	x0, x19
	mov	w1, #1
	mov	x2, x8
	mov	w4, #1
	bl	_ipw2100_set_key
	mov	x21, x0
	cbnz	w0, LBB0_15
; %bb.26:
	ldr	x9, [x19, #8]
LBB0_27:
	ldr	x8, [x9, #40]
	ldr	w8, [x8, #8]
	ldrb	w10, [x9]
	tbnz	w10, #2, LBB0_29
; %bb.28:
Lloh38:
	adrp	x9, _WEP_KEY_LEN@GOTPAGE
Lloh39:
	ldr	x9, [x9, _WEP_KEY_LEN@GOTPAGEOFF]
Lloh40:
	ldr	w2, [x9]
	mov	x0, x8
	mov	w1, #0
	bl	_memset
	ldr	x9, [x19, #8]
	ldr	x8, [x9, #32]
	str	xzr, [x8, #16]
	b	LBB0_31
LBB0_29:
	ldr	x9, [x9, #32]
	ldr	x3, [x9, #16]
	mov	x0, x19
	mov	w1, #2
	mov	x2, x8
	mov	w4, #1
	bl	_ipw2100_set_key
	mov	x21, x0
	cbnz	w0, LBB0_15
; %bb.30:
	ldr	x9, [x19, #8]
LBB0_31:
	ldr	x8, [x9, #40]
	ldr	w8, [x8, #12]
	ldrb	w10, [x9]
	tbnz	w10, #3, LBB0_33
; %bb.32:
Lloh41:
	adrp	x9, _WEP_KEY_LEN@GOTPAGE
Lloh42:
	ldr	x9, [x9, _WEP_KEY_LEN@GOTPAGEOFF]
Lloh43:
	ldr	w2, [x9]
	mov	x0, x8
	mov	w1, #0
	bl	_memset
	ldr	x8, [x19, #8]
	ldr	x9, [x8, #32]
	str	xzr, [x9, #24]
	b	LBB0_35
LBB0_33:
	ldr	x9, [x9, #32]
	ldr	x3, [x9, #24]
	mov	x0, x19
	mov	w1, #3
	mov	x2, x8
	mov	w4, #1
	bl	_ipw2100_set_key
	mov	x21, x0
	cbnz	w0, LBB0_15
; %bb.34:
	ldr	x8, [x19, #8]
LBB0_35:
	ldr	w1, [x8, #48]
	mov	x0, x19
	mov	w2, #1
	bl	_ipw2100_set_key_index
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #24]
	cbz	x8, LBB0_37
; %bb.36:
Lloh44:
	adrp	x8, _IPW_PRIVACY_CAPABLE@GOTPAGE
Lloh45:
	ldr	x8, [x8, _IPW_PRIVACY_CAPABLE@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
	b	LBB0_38
LBB0_37:
	mov	w1, #0
LBB0_38:
	mov	x0, x19
	mov	w2, #1
	bl	_ipw2100_set_wep_flags
	mov	x21, x0
	cbnz	w0, LBB0_15
; %bb.39:
Lloh47:
	adrp	x8, _STATUS_SECURITY_UPDATED@GOTPAGE
Lloh48:
	ldr	x8, [x8, _STATUS_SECURITY_UPDATED@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_STATUS_RUNNING,4,2             ; @STATUS_RUNNING
	.comm	_IPW_AUTH_OPEN,4,2              ; @IPW_AUTH_OPEN
	.comm	_SEC_LEVEL_0,4,2                ; @SEC_LEVEL_0
	.comm	_SEC_AUTH_MODE,4,2              ; @SEC_AUTH_MODE
	.comm	_WLAN_AUTH_SHARED_KEY,8,3       ; @WLAN_AUTH_SHARED_KEY
	.comm	_IPW_AUTH_SHARED,4,2            ; @IPW_AUTH_SHARED
	.comm	_WLAN_AUTH_LEAP,8,3             ; @WLAN_AUTH_LEAP
	.comm	_IPW_AUTH_LEAP_CISCO_ID,4,2     ; @IPW_AUTH_LEAP_CISCO_ID
	.comm	_SEC_LEVEL,4,2                  ; @SEC_LEVEL
	.comm	_SEC_UNICAST_GROUP,4,2          ; @SEC_UNICAST_GROUP
	.comm	_WEP_KEY_LEN,4,2                ; @WEP_KEY_LEN
	.comm	_IPW_PRIVACY_CAPABLE,4,2        ; @IPW_PRIVACY_CAPABLE
	.comm	_STATUS_SECURITY_UPDATED,4,2    ; @STATUS_SECURITY_UPDATED
	.no_dead_strip	_ipw2100_configure_security
.subsections_via_symbols
