	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function shim__set_security
LCPI0_0:
	.long	2                               ## 0x2
	.long	4                               ## 0x4
	.long	8                               ## 0x8
	.long	16                              ## 0x10
LCPI0_1:
	.long	32                              ## 0x20
	.long	64                              ## 0x40
	.long	128                             ## 0x80
	.long	256                             ## 0x100
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_shim__set_security:                    ## @shim__set_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	%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	%rsi, %r12
	callq	_libipw_priv
	movq	%rax, %r15
	leaq	4(%rax), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	_STATUS_INITIALIZED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_26
## %bb.1:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	_SEC_LEVEL_1@GOTPCREL(%rip), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	notl	%r13d
	movq	8(%r15), %rax
	andl	%r13d, 8(%rax)
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpq	$4, %rbx
	je	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %eax
	movl	$1, %r13d
	movl	%ebx, %ecx
	shll	%cl, %r13d
	btl	%ebx, %eax
	jae	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r12), %rcx
	movq	(%rcx,%rbx,8), %rdx
	movq	8(%r15), %rax
	movq	(%rax), %rsi
	movq	%rdx, (%rsi,%rbx,8)
	movq	(%rcx,%rbx,8), %rdx
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	56(%rax), %rax
	movl	(%rax,%rbx,4), %edi
	movq	56(%r12), %rax
	movl	(%rax,%rbx,4), %esi
	callq	_memcpy
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %ecx
	notl	%ecx
	andl	%ecx, 8(%rax)
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r12), %rax
	cmpq	(%r14), %rax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %rax
	orl	%r13d, 8(%rax)
	movq	_STATUS_SECURITY_UPDATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
	jmp	LBB0_9
LBB0_10:
	movl	(%r12), %eax
	movq	_SEC_ACTIVE_KEY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_13
## %bb.11:
	movq	8(%r15), %rdx
	movq	24(%r12), %rsi
	cmpq	%rsi, 16(%rdx)
	je	LBB0_13
## %bb.12:
	movq	%rsi, 16(%rdx)
	orl	%ecx, 8(%rdx)
	movq	_STATUS_SECURITY_UPDATED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%r15)
LBB0_13:
	movq	_SEC_AUTH_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_16
## %bb.14:
	movq	8(%r15), %rdx
	movq	32(%r12), %rsi
	cmpq	%rsi, 24(%rdx)
	je	LBB0_16
## %bb.15:
	movq	%rsi, 24(%rdx)
	orl	%ecx, 8(%rdx)
	movq	_STATUS_SECURITY_UPDATED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%r15)
LBB0_16:
	movq	_SEC_ENABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_19
## %bb.17:
	movq	8(%r15), %rdx
	movq	40(%r12), %rsi
	cmpq	%rsi, 32(%rdx)
	je	LBB0_19
## %bb.18:
	orl	%ecx, 8(%rdx)
	movq	%rsi, 32(%rdx)
	movq	_STATUS_SECURITY_UPDATED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%r15)
LBB0_19:
	movq	_SEC_ENCRYPT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_21
## %bb.20:
	movl	48(%r12), %ecx
	movq	8(%r15), %rdx
	movl	%ecx, 48(%rdx)
LBB0_21:
	movq	_SEC_LEVEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	8(%r15), %rcx
	testl	%eax, %edx
	je	LBB0_24
## %bb.22:
	movq	16(%r12), %rax
	cmpq	%rax, 40(%rcx)
	je	LBB0_24
## %bb.23:
	movq	%rax, 40(%rcx)
	orl	%edx, 8(%rcx)
	movq	_STATUS_SECURITY_UPDATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
LBB0_24:
	movl	8(%rcx), %edi
	movd	%edi, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movdqa	LCPI0_0(%rip), %xmm1            ## xmm1 = [2,4,8,16]
	pand	%xmm0, %xmm1
	pand	LCPI0_1(%rip), %xmm0
	pxor	%xmm2, %xmm2
	pcmpeqd	%xmm2, %xmm0
	pcmpeqd	%xmm2, %xmm1
	packssdw	%xmm0, %xmm1
	packsswb	%xmm1, %xmm1
	pmovmskb	%xmm1, %eax
	movl	%eax, %r12d
	andb	$8, %r12b
	shrb	$3, %r12b
	movl	%eax, %r8d
	andb	$16, %r8b
	shrb	$4, %r8b
	movl	%eax, %r9d
	andb	$32, %r9b
	shrb	$5, %r9b
	movl	%eax, %edx
	andb	$64, %dl
	shrb	$6, %dl
	movl	%eax, %esi
	shrb	$7, %sil
	movl	%eax, %ebx
	andb	$4, %bl
	shrb	$2, %bl
	movl	%eax, %ecx
	andb	$2, %cl
	shrb	%cl
	andb	$1, %dil
	orb	$48, %dil
	movzbl	%dil, %r10d
	andl	$1, %eax
	xorl	$49, %eax
	movzbl	%cl, %r11d
	xorl	$49, %r11d
	movzbl	%bl, %r14d
	xorl	$49, %r14d
	movzbl	%sil, %esi
	xorl	$49, %esi
	movzbl	%dl, %edx
	xorl	$49, %edx
	movzbl	%r9b, %ecx
	xorl	$49, %ecx
	movzbl	%r8b, %r8d
	xorl	$49, %r8d
	movzbl	%r12b, %r9d
	xorl	$49, %r9d
	leaq	L_.str(%rip), %rdi
	pushq	%r10
	pushq	%rax
	pushq	%r11
	pushq	%r14
	callq	_IPW_DEBUG_WEP
	addq	$32, %rsp
	movq	_STATUS_ASSOCIATED@GOTPCREL(%rip), %rax
	movq	_STATUS_ASSOCIATING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, (%r15)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_26
## %bb.25:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_ipw2100_configure_security
LBB0_26:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_STATUS_INITIALIZED,4,2         ## @STATUS_INITIALIZED
	.comm	_SEC_LEVEL_1,8,3                ## @SEC_LEVEL_1
	.comm	_STATUS_SECURITY_UPDATED,4,2    ## @STATUS_SECURITY_UPDATED
	.comm	_SEC_ACTIVE_KEY,4,2             ## @SEC_ACTIVE_KEY
	.comm	_SEC_AUTH_MODE,4,2              ## @SEC_AUTH_MODE
	.comm	_SEC_ENABLED,4,2                ## @SEC_ENABLED
	.comm	_SEC_ENCRYPT,4,2                ## @SEC_ENCRYPT
	.comm	_SEC_LEVEL,4,2                  ## @SEC_LEVEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Security flags: %c %c%c%c%c %c%c%c%c\n"

	.comm	_STATUS_ASSOCIATED,4,2          ## @STATUS_ASSOCIATED
	.comm	_STATUS_ASSOCIATING,4,2         ## @STATUS_ASSOCIATING
	.no_dead_strip	_shim__set_security
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function shim__set_security
_shim__set_security:                    ; @shim__set_security
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	bl	_libipw_priv
	mov	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _STATUS_INITIALIZED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _STATUS_INITIALIZED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_26
; %bb.1:
	mov	x23, #0
	mov	w24, #1
Lloh3:
	adrp	x25, _SEC_LEVEL_1@GOTPAGE
Lloh4:
	ldr	x25, [x25, _SEC_LEVEL_1@GOTPAGEOFF]
Lloh5:
	adrp	x22, _STATUS_SECURITY_UPDATED@GOTPAGE
Lloh6:
	ldr	x22, [x22, _STATUS_SECURITY_UPDATED@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #8]
	ldr	w9, [x8, #8]
	bic	w9, w9, w26
	str	w9, [x8, #8]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x23, #1
	cmp	x23, #4
	b.eq	LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21]
	lsl	w26, w24, w23
	tst	w8, w26
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x21, #8]
	lsl	x10, x23, #3
	ldr	x11, [x9, x10]
	ldr	x8, [x20, #8]
	ldr	x12, [x8]
	str	x11, [x12, x10]
	ldr	x2, [x9, x10]
	cbz	x2, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x8, #56]
	lsl	x9, x23, #2
	ldr	w0, [x8, x9]
	ldr	x8, [x21, #56]
	ldr	w1, [x8, x9]
	bl	_memcpy
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x8, #8]
	bic	w9, w9, w26
	str	w9, [x8, #8]
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #16]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #8]
	ldr	w9, [x8, #8]
	orr	w9, w9, w26
	str	w9, [x8, #8]
	ldr	w8, [x22]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
	b	LBB0_3
LBB0_10:
	ldr	w8, [x21]
Lloh7:
	adrp	x9, _SEC_ACTIVE_KEY@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SEC_ACTIVE_KEY@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.11:
	ldr	x10, [x20, #8]
	ldr	x12, [x10, #16]
	ldr	x11, [x21, #24]
	cmp	x12, x11
	b.eq	LBB0_13
; %bb.12:
	str	x11, [x10, #16]
	ldr	w11, [x10, #8]
	orr	w9, w11, w9
	str	w9, [x10, #8]
	ldr	w9, [x22]
	ldr	w10, [x20]
	orr	w9, w10, w9
	str	w9, [x20]
LBB0_13:
Lloh10:
	adrp	x9, _SEC_AUTH_MODE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SEC_AUTH_MODE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.14:
	ldr	x10, [x20, #8]
	ldr	x12, [x10, #24]
	ldr	x11, [x21, #32]
	cmp	x12, x11
	b.eq	LBB0_16
; %bb.15:
	str	x11, [x10, #24]
	ldr	w11, [x10, #8]
	orr	w9, w11, w9
	str	w9, [x10, #8]
	ldr	w9, [x22]
	ldr	w10, [x20]
	orr	w9, w10, w9
	str	w9, [x20]
LBB0_16:
Lloh13:
	adrp	x9, _SEC_ENABLED@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SEC_ENABLED@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.17:
	ldr	x10, [x20, #8]
	ldr	x12, [x10, #32]
	ldr	x11, [x21, #40]
	cmp	x12, x11
	b.eq	LBB0_19
; %bb.18:
	ldr	w12, [x10, #8]
	orr	w9, w12, w9
	str	w9, [x10, #8]
	str	x11, [x10, #32]
	ldr	w9, [x22]
	ldr	w10, [x20]
	orr	w9, w10, w9
	str	w9, [x20]
LBB0_19:
Lloh16:
	adrp	x9, _SEC_ENCRYPT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SEC_ENCRYPT@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.20:
	ldr	w9, [x21, #48]
	ldr	x10, [x20, #8]
	str	w9, [x10, #48]
LBB0_21:
Lloh19:
	adrp	x9, _SEC_LEVEL@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SEC_LEVEL@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x9]
	ldr	x9, [x20, #8]
	tst	w10, w8
	b.eq	LBB0_24
; %bb.22:
	ldr	x11, [x9, #40]
	ldr	x8, [x21, #16]
	cmp	x11, x8
	b.eq	LBB0_24
; %bb.23:
	str	x8, [x9, #40]
	ldr	w8, [x9, #8]
	orr	w8, w8, w10
	str	w8, [x9, #8]
	ldr	w8, [x22]
	ldr	w10, [x20]
	orr	w8, w10, w8
	str	w8, [x20]
LBB0_24:
	ldr	w8, [x9, #8]
	tst	w8, #0x2
	mov	w9, #48
	cinc	w10, w9, ne
	mov	w11, #48
	bfxil	w11, w8, #0, #1
	strb	w11, [sp, #1]
	strb	w10, [sp]
	tst	w8, #0x100
	cinc	w1, w9, ne
	tst	w8, #0x80
	cinc	w2, w9, ne
	tst	w8, #0x40
	cinc	w3, w9, ne
	tst	w8, #0x20
	cinc	w4, w9, ne
	tst	w8, #0x10
	cinc	w5, w9, ne
	tst	w8, #0x8
	cinc	w6, w9, ne
	tst	w8, #0x4
	cinc	w7, w9, ne
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IPW_DEBUG_WEP
	ldr	w8, [x20]
Lloh24:
	adrp	x9, _STATUS_ASSOCIATED@GOTPAGE
Lloh25:
	ldr	x9, [x9, _STATUS_ASSOCIATED@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
Lloh27:
	adrp	x10, _STATUS_ASSOCIATING@GOTPAGE
Lloh28:
	ldr	x10, [x10, _STATUS_ASSOCIATING@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.ne	LBB0_26
; %bb.25:
	mov	x0, x20
	mov	w1, #0
	bl	_ipw2100_configure_security
LBB0_26:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_STATUS_INITIALIZED,4,2         ; @STATUS_INITIALIZED
	.comm	_SEC_LEVEL_1,8,3                ; @SEC_LEVEL_1
	.comm	_STATUS_SECURITY_UPDATED,4,2    ; @STATUS_SECURITY_UPDATED
	.comm	_SEC_ACTIVE_KEY,4,2             ; @SEC_ACTIVE_KEY
	.comm	_SEC_AUTH_MODE,4,2              ; @SEC_AUTH_MODE
	.comm	_SEC_ENABLED,4,2                ; @SEC_ENABLED
	.comm	_SEC_ENCRYPT,4,2                ; @SEC_ENCRYPT
	.comm	_SEC_LEVEL,4,2                  ; @SEC_LEVEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Security flags: %c %c%c%c%c %c%c%c%c\n"

	.comm	_STATUS_ASSOCIATED,4,2          ; @STATUS_ASSOCIATED
	.comm	_STATUS_ASSOCIATING,4,2         ; @STATUS_ASSOCIATING
	.no_dead_strip	_shim__set_security
.subsections_via_symbols
