	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hostapd_config_read_wep
_hostapd_config_read_wep:               ## @hostapd_config_read_wep
	.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	%rdx, %r13
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	%rdx, %rdi
	callq	_os_strlen
	movl	$-1, %r15d
	cmpl	$3, %ebx
	ja	LBB0_26
## %bb.1:
	movq	%rax, %r12
	movq	16(%r14), %rax
	movl	%ebx, %ebx
	movq	(%rax,%rbx,8), %rdi
	testq	%r12, %r12
	je	LBB0_2
## %bb.15:
	testq	%rdi, %rdi
	jne	LBB0_26
## %bb.16:
	cmpb	$34, (%r13)
	jne	LBB0_21
## %bb.17:
	cmpq	$2, %r12
	jb	LBB0_26
## %bb.18:
	cmpb	$34, -1(%r12,%r13)
	jne	LBB0_26
## %bb.19:
	addq	$-2, %r12
	incq	%r13
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_os_memdup
	movq	16(%r14), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	16(%r14), %rax
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_26
## %bb.20:
	movq	(%r14), %rax
	movq	%r12, (%rax,%rbx,8)
	jmp	LBB0_24
LBB0_2:
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rsi
	callq	_bin_clear_free
	movq	16(%r14), %rax
	movq	$0, (%rax,%rbx,8)
	movq	(%r14), %rax
	movq	$0, (%rax,%rbx,8)
	movq	_NUM_WEP_KEYS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_14
## %bb.3:
	movq	16(%r14), %rcx
	cmpl	$4, %eax
	jae	LBB0_5
## %bb.4:
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	LBB0_12
LBB0_21:
	testb	$1, %r12b
	jne	LBB0_26
## %bb.22:
	shrq	%r12
	movq	%r12, %rdi
	callq	_os_malloc
	movq	16(%r14), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	16(%r14), %rax
	movq	(%rax,%rbx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_26
## %bb.23:
	movq	(%r14), %rax
	movq	%r12, (%rax,%rbx,8)
	movq	%r13, %rdi
	movq	%r12, %rdx
	callq	_hexstr2bin
	testq	%rax, %rax
	js	LBB0_26
LBB0_24:
	incq	8(%r14)
	jmp	LBB0_25
LBB0_5:
	movl	%eax, %edx
	andl	$-4, %edx
	leaq	-4(%rdx), %rsi
	movq	%rsi, %rbx
	shrq	$2, %rbx
	incq	%rbx
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.7:
	movq	%rbx, %rsi
	andq	$-2, %rsi
	pxor	%xmm2, %xmm2
	xorl	%edi, %edi
	pcmpeqd	%xmm3, %xmm3
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rcx,%rdi,8), %xmm4
	movdqu	16(%rcx,%rdi,8), %xmm5
	movdqu	32(%rcx,%rdi,8), %xmm6
	movdqu	48(%rcx,%rdi,8), %xmm7
	pcmpeqq	%xmm2, %xmm4
	pshufd	$232, %xmm4, %xmm4              ## xmm4 = xmm4[0,2,2,3]
	paddd	%xmm0, %xmm4
	pcmpeqq	%xmm2, %xmm5
	pshufd	$232, %xmm5, %xmm5              ## xmm5 = xmm5[0,2,2,3]
	paddd	%xmm1, %xmm5
	pcmpeqq	%xmm2, %xmm6
	pshufd	$232, %xmm6, %xmm0              ## xmm0 = xmm6[0,2,2,3]
	paddd	%xmm4, %xmm0
	pcmpeqq	%xmm2, %xmm7
	pshufd	$232, %xmm7, %xmm1              ## xmm1 = xmm7[0,2,2,3]
	paddd	%xmm5, %xmm1
	psubd	%xmm3, %xmm0
	psubd	%xmm3, %xmm0
	psubd	%xmm3, %xmm1
	psubd	%xmm3, %xmm1
	addq	$8, %rdi
	addq	$-2, %rsi
	jne	LBB0_8
## %bb.9:
	testb	$1, %bl
	je	LBB0_11
LBB0_10:
	movdqu	(%rcx,%rdi,8), %xmm2
	movdqu	16(%rcx,%rdi,8), %xmm3
	pxor	%xmm4, %xmm4
	pcmpeqq	%xmm4, %xmm2
	pshufd	$232, %xmm2, %xmm2              ## xmm2 = xmm2[0,2,2,3]
	paddd	%xmm2, %xmm0
	pcmpeqq	%xmm4, %xmm3
	pshufd	$232, %xmm3, %xmm2              ## xmm2 = xmm3[0,2,2,3]
	paddd	%xmm2, %xmm1
	pcmpeqd	%xmm2, %xmm2
	psubd	%xmm2, %xmm0
	psubd	%xmm2, %xmm1
LBB0_11:
	paddd	%xmm1, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	paddd	%xmm0, %xmm1
	movd	%xmm1, %esi
	cmpq	%rax, %rdx
	je	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$1, (%rcx,%rdx,8)
	sbbl	$-1, %esi
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_12
LBB0_13:
	xorl	%r15d, %r15d
	testl	%esi, %esi
	jne	LBB0_26
LBB0_14:
	movq	$0, 8(%r14)
LBB0_25:
	xorl	%r15d, %r15d
LBB0_26:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	pxor	%xmm1, %xmm1
	testb	$1, %bl
	jne	LBB0_10
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_WEP_KEYS,4,2               ## @NUM_WEP_KEYS
	.no_dead_strip	_hostapd_config_read_wep
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hostapd_config_read_wep
_hostapd_config_read_wep:               ; @hostapd_config_read_wep
	.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, x2
	mov	x21, x1
	mov	x19, x0
	mov	x0, x2
	bl	_os_strlen
	cmp	w21, #3
	b.hi	LBB0_3
; %bb.1:
	ldr	x8, [x19, #16]
	mov	w22, w21
	ldr	x8, [x8, w21, uxtw #3]
	cbz	x0, LBB0_5
; %bb.2:
	cbz	x8, LBB0_8
LBB0_3:
	mov	w0, #-1
LBB0_4:
	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_5:
	ldr	x9, [x19]
	lsl	x20, x22, #3
	ldr	x1, [x9, x20]
	mov	x0, x8
	bl	_bin_clear_free
	ldr	x8, [x19, #16]
	str	xzr, [x8, x20]
	ldr	x8, [x19]
	str	xzr, [x8, x20]
Lloh0:
	adrp	x8, _NUM_WEP_KEYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NUM_WEP_KEYS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.6:
	ldr	x9, [x19, #16]
	cmp	w8, #8
	b.hs	LBB0_13
; %bb.7:
	mov	x10, #0
	mov	w11, #0
	b	LBB0_16
LBB0_8:
	ldrb	w8, [x20]
	cmp	w8, #34
	b.ne	LBB0_21
; %bb.9:
	subs	x21, x0, #2
	b.lo	LBB0_3
; %bb.10:
	add	x8, x0, x20
	ldurb	w8, [x8, #-1]
	cmp	w8, #34
	b.ne	LBB0_3
; %bb.11:
	add	x0, x20, #1
	mov	x1, x21
	bl	_os_memdup
	ldr	x8, [x19, #16]
	lsl	x9, x22, #3
	str	x0, [x8, x9]
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x9]
	cbz	x8, LBB0_3
; %bb.12:
	ldr	x8, [x19]
	str	x21, [x8, x22, lsl #3]
	b	LBB0_24
LBB0_13:
	and	x10, x8, #0xfffffff8
	movi.2d	v0, #0000000000000000
	add	x11, x9, #32
	mov	x12, x10
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x11, #-32]
	ldp	q6, q7, [x11], #64
	cmtst.2d	v4, v4, v4
	xtn.2s	v4, v4
	cmtst.2d	v5, v5, v5
	xtn.2s	v5, v5
	cmtst.2d	v6, v6, v6
	xtn.2s	v6, v6
	cmtst.2d	v7, v7, v7
	xtn.2s	v7, v7
	sub.2s	v0, v0, v4
	sub.2s	v1, v1, v5
	sub.2s	v2, v2, v6
	sub.2s	v3, v3, v7
	subs	x12, x12, #8
	b.ne	LBB0_14
; %bb.15:
	add.2s	v0, v1, v0
	add.2s	v0, v2, v0
	add.2s	v0, v3, v0
	addp.2s	v0, v0, v0
	fmov	w11, s0
	cmp	x10, x8
	b.eq	LBB0_18
LBB0_16:
	add	x9, x9, x10, lsl #3
	sub	x8, x8, x10
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9], #8
	cmp	x10, #0
	cinc	w11, w11, ne
	subs	x8, x8, #1
	b.ne	LBB0_17
LBB0_18:
	cbz	w11, LBB0_20
; %bb.19:
	mov	w0, #0
	b	LBB0_4
LBB0_20:
	mov	w0, #0
	str	xzr, [x19, #8]
	b	LBB0_4
LBB0_21:
	tbnz	w0, #0, LBB0_3
; %bb.22:
	lsr	x21, x0, #1
	mov	x0, x21
	bl	_os_malloc
	ldr	x8, [x19, #16]
	lsl	x9, x22, #3
	str	x0, [x8, x9]
	ldr	x8, [x19, #16]
	ldr	x1, [x8, x9]
	cbz	x1, LBB0_3
; %bb.23:
	ldr	x8, [x19]
	str	x21, [x8, x22, lsl #3]
	mov	x0, x20
	mov	x2, x21
	bl	_hexstr2bin
	tbnz	x0, #63, LBB0_3
LBB0_24:
	mov	w0, #0
	ldr	x8, [x19, #8]
	add	x8, x8, #1
	str	x8, [x19, #8]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_WEP_KEYS,4,2               ; @NUM_WEP_KEYS
	.no_dead_strip	_hostapd_config_read_wep
.subsections_via_symbols
