	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function an_setkeys
_an_setkeys:                            ## @an_setkeys
	.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
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	-32(%rbp), %rdi
	movl	$8, %esi
	callq	_bzero
	movq	%rbx, %rdi
	callq	_strlen
	cmpl	$29, %eax
	jl	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_2:
	leaq	-32(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_an_str2key
	movl	%r15d, %eax
	shrl	$31, %eax
	addl	%r15d, %eax
	sarl	%eax
	movl	%eax, -32(%rbp)
	movl	-28(%rbp), %eax
	cmpl	$13, %eax
	ja	LBB0_4
## %bb.3:
	movl	$8225, %ecx                     ## imm = 0x2021
	btl	%eax, %ecx
	jb	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_5:
	movq	-24(%rbp), %rax
	movl	$1, (%rax)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 4(%rax)
	movl	$0, 20(%rax)
	movl	$16, -32(%rbp)
	testb	$1, %r15b
	jne	LBB0_6
## %bb.7:
	movq	_AN_RID_WEP_PERM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_AN_RID_WEP_TEMP@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_an_setval
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"encryption key must be no more than 18 characters long"

L_.str.1:                               ## @.str.1
	.asciz	"encryption key must be 0, 5 or 13 bytes long"

	.comm	_AN_RID_WEP_PERM,4,2            ## @AN_RID_WEP_PERM
	.comm	_AN_RID_WEP_TEMP,4,2            ## @AN_RID_WEP_TEMP
	.no_dead_strip	_an_setkeys
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function an_setkeys
_an_setkeys:                            ; @an_setkeys
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x2
	mov	x21, x1
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #8
	bl	_bzero
	mov	x0, x21
	bl	_strlen
	cmp	w0, #29
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
	add	x1, sp, #8
	mov	x0, x21
	bl	_an_str2key
	cmp	w20, #0
	cinc	w8, w20, lt
	asr	w8, w8, #1
	str	w8, [sp, #8]
	ldr	w8, [sp, #12]
	cmp	w8, #13
	mov	w21, #1
	lsl	w8, w21, w8
	mov	w9, #8225
	and	w8, w8, w9
	ccmp	w8, #0, #4, ls
	b.ne	LBB0_4
; %bb.3:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_4:
	ldr	x8, [sp, #16]
	str	w21, [x8]
	stur	xzr, [x8, #12]
	stur	xzr, [x8, #4]
	str	wzr, [x8, #20]
	mov	w8, #16
	str	w8, [sp, #8]
Lloh4:
	adrp	x8, _AN_RID_WEP_PERM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AN_RID_WEP_PERM@GOTPAGEOFF]
Lloh6:
	adrp	x9, _AN_RID_WEP_TEMP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AN_RID_WEP_TEMP@GOTPAGEOFF]
	tst	w20, #0x1
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	str	w8, [sp, #12]
	add	x1, sp, #8
	mov	x0, x19
	bl	_an_setval
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"encryption key must be no more than 18 characters long"

l_.str.1:                               ; @.str.1
	.asciz	"encryption key must be 0, 5 or 13 bytes long"

	.comm	_AN_RID_WEP_PERM,4,2            ; @AN_RID_WEP_PERM
	.comm	_AN_RID_WEP_TEMP,4,2            ; @AN_RID_WEP_TEMP
	.no_dead_strip	_an_setkeys
.subsections_via_symbols
