	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl1251_read_nvs_mac
_wl1251_read_nvs_mac:                   ## @wl1251_read_nvs_mac
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_ETH_ALEN@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%r14, %rdi
	callq	_wl1251_check_nvs_mac
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_9
## %bb.2:
	movq	8(%r14), %rcx
	movq	_NVS_OFF_MAC_DATA@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r9d
	cmpl	$8, %eax
	jae	LBB0_14
LBB0_3:
	xorl	%r10d, %r10d
LBB0_4:
	movq	%r10, %rdx
	notq	%rdx
	testb	$1, %al
	je	LBB0_6
## %bb.5:
	movl	%r10d, %esi
	notl	%esi
	addl	%eax, %esi
	addl	%r9d, %esi
	movslq	%esi, %rsi
	movl	(%rcx,%rsi,4), %esi
	movl	%esi, (%r12,%r10,4)
	orq	$1, %r10
LBB0_6:
	addq	%rax, %rdx
	je	LBB0_9
## %bb.7:
	movl	%eax, %edx
	subq	%r10, %rax
	addl	%edx, %r9d
	movl	%r10d, %edx
	notl	%edx
	addl	%r9d, %edx
	leaq	(%r12,%r10,4), %rsi
	addq	$4, %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%edx, %rdx
	movl	(%rcx,%rdx,4), %ebx
	movl	%ebx, -4(%rsi,%rdi,4)
	leal	-1(%rdx), %ebx
	movslq	%ebx, %rbx
	movl	(%rcx,%rbx,4), %ebx
	movl	%ebx, (%rsi,%rdi,4)
	addq	$2, %rdi
	addl	$-2, %edx
	cmpq	%rdi, %rax
	jne	LBB0_8
LBB0_9:
	leaq	l_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_ether_addr_equal_unaligned
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_11:
	movl	(%r14), %edi
	movl	(%r15), %edx
	movq	%r12, %rsi
	callq	_memcpy
	xorl	%eax, %eax
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_26
## %bb.13:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	leaq	-1(%rax), %rdx
	leal	(%r9,%rax), %esi
	decl	%esi
	movl	%esi, %edi
	subl	%edx, %edi
	xorl	%r10d, %r10d
	cmpl	%esi, %edi
	jg	LBB0_4
## %bb.15:
	shrq	$32, %rdx
	jne	LBB0_4
## %bb.16:
	leal	(%r9,%rax), %edx
	decl	%edx
	movslq	%edx, %rdx
	leaq	(%rcx,%rdx,4), %rsi
	addq	$4, %rsi
	cmpq	%rsi, %r12
	jae	LBB0_19
## %bb.17:
	leaq	(%r12,%rax,4), %rsi
	incq	%rdx
	subq	%rax, %rdx
	leaq	(%rcx,%rdx,4), %rdx
	cmpq	%rsi, %rdx
	jb	LBB0_3
LBB0_19:
	movl	%eax, %r10d
	andl	$-8, %r10d
	leaq	-8(%r10), %rdx
	movq	%rdx, %r8
	shrq	$3, %r8
	incq	%r8
	testq	%rdx, %rdx
	je	LBB0_22
## %bb.20:
	movq	%r8, %rdx
	andq	$-2, %rdx
	leal	(%r9,%rax), %esi
	addl	$-9, %esi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	leal	8(%rsi), %ebx
	movslq	%ebx, %rbx
	movdqu	-28(%rcx,%rbx,4), %xmm0
	movdqu	-12(%rcx,%rbx,4), %xmm1
	pshufd	$27, %xmm1, %xmm1               ## xmm1 = xmm1[3,2,1,0]
	pshufd	$27, %xmm0, %xmm0               ## xmm0 = xmm0[3,2,1,0]
	movdqa	%xmm1, (%r12,%rdi,4)
	movdqa	%xmm0, 16(%r12,%rdi,4)
	movslq	%esi, %rsi
	movdqu	-28(%rcx,%rsi,4), %xmm0
	movdqu	-12(%rcx,%rsi,4), %xmm1
	pshufd	$27, %xmm1, %xmm1               ## xmm1 = xmm1[3,2,1,0]
	pshufd	$27, %xmm0, %xmm0               ## xmm0 = xmm0[3,2,1,0]
	movdqa	%xmm1, 32(%r12,%rdi,4)
	movdqa	%xmm0, 48(%r12,%rdi,4)
	addq	$16, %rdi
	addl	$-16, %esi
	addq	$-2, %rdx
	jne	LBB0_21
	jmp	LBB0_23
LBB0_22:
	xorl	%edi, %edi
LBB0_23:
	testb	$1, %r8b
	je	LBB0_25
## %bb.24:
	movl	%edi, %edx
	notl	%edx
	addl	%eax, %edx
	addl	%r9d, %edx
	movslq	%edx, %rdx
	movdqu	-28(%rcx,%rdx,4), %xmm0
	movdqu	-12(%rcx,%rdx,4), %xmm1
	pshufd	$27, %xmm1, %xmm1               ## xmm1 = xmm1[3,2,1,0]
	pshufd	$27, %xmm0, %xmm0               ## xmm0 = xmm0[3,2,1,0]
	movdqa	%xmm1, (%r12,%rdi,4)
	movdqa	%xmm0, 16(%r12,%rdi,4)
LBB0_25:
	cmpq	%rax, %r10
	jne	LBB0_4
	jmp	LBB0_9
LBB0_26:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_NVS_OFF_MAC_DATA,4,2           ## @NVS_OFF_MAC_DATA
	.section	__TEXT,__const
l_.str:                                 ## @.str
	.asciz	"\000\000 \007\003\t"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_wl1251_read_nvs_mac
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl1251_read_nvs_mac
_wl1251_read_nvs_mac:                   ; @wl1251_read_nvs_mac
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x21, _ETH_ALEN@GOTPAGE
Lloh4:
	ldr	x21, [x21, _ETH_ALEN@GOTPAGEOFF]
	ldr	w8, [x21]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	bl	_wl1251_check_nvs_mac
	cbnz	w0, LBB0_14
; %bb.1:
	ldr	w9, [x21]
	cmp	w9, #1
	b.lt	LBB0_11
; %bb.2:
	ldr	x8, [x19, #8]
Lloh7:
	adrp	x10, _NVS_OFF_MAC_DATA@GOTPAGE
Lloh8:
	ldr	x10, [x10, _NVS_OFF_MAC_DATA@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	cmp	w9, #16
	b.lo	LBB0_8
; %bb.3:
	sub	x12, x9, #1
	add	w11, w10, w9
	sub	w11, w11, #1
	sub	w13, w11, w12
	cmp	w13, w11
	lsr	x12, x12, #32
	ccmp	x12, #0, #0, le
	b.ne	LBB0_8
; %bb.4:
	add	x12, x20, x9, lsl #2
	add	w13, w10, w9
	sub	w13, w13, #1
	sxtw	x13, w13
	add	x13, x13, #1
	sub	x14, x13, x9
	add	x14, x8, x14, lsl #2
	add	x13, x8, x13, lsl #2
	cmp	x20, x13
	ccmp	x14, x12, #2, lo
	b.lo	LBB0_8
; %bb.5:
	and	x12, x9, #0xfffffff0
	add	x13, x20, #32
	mov	x14, x12
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x15, x8, w11, sxtw #2
	ldur	q0, [x15, #-12]
	rev64.4s	v0, v0
	ext.16b	v0, v0, v0, #8
	ldur	q1, [x15, #-28]
	rev64.4s	v1, v1
	ext.16b	v1, v1, v1, #8
	ldur	q2, [x15, #-44]
	rev64.4s	v2, v2
	ext.16b	v2, v2, v2, #8
	ldur	q3, [x15, #-60]
	rev64.4s	v3, v3
	ext.16b	v3, v3, v3, #8
	stp	q0, q1, [x13, #-32]
	stp	q2, q3, [x13], #64
	sub	w11, w11, #16
	sub	x14, x14, #16
	cbnz	x14, LBB0_6
; %bb.7:
	cmp	x12, x9
	b.ne	LBB0_9
	b	LBB0_11
LBB0_8:
	mov	x12, #0
LBB0_9:
	mvn	w11, w12
	add	w10, w10, w9
	add	w10, w11, w10
	add	x11, x20, x12, lsl #2
	sub	x9, x9, x12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x8, w10, sxtw #2]
	str	w12, [x11], #4
	sub	w10, w10, #1
	subs	x9, x9, #1
	b.ne	LBB0_10
LBB0_11:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_ether_addr_equal_unaligned
	cbz	x0, LBB0_13
; %bb.12:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_13:
	ldr	w0, [x19]
	ldr	w2, [x21]
	mov	x1, x20
	bl	_memcpy
	mov	w0, #0
LBB0_14:
	ldur	x8, [x29, #-40]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	sub	sp, x29, #32
	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_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_NVS_OFF_MAC_DATA,4,2           ; @NVS_OFF_MAC_DATA
	.section	__TEXT,__const
l_.str:                                 ; @.str
	.asciz	"\000\000 \007\003\t"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_wl1251_read_nvs_mac
.subsections_via_symbols
