	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl1251_fetch_nvs
_wl1251_fetch_nvs:                      ## @wl1251_fetch_nvs
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	callq	_wiphy_dev
	movq	_WL1251_NVS_NAME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-24(%rbp), %rdi
	movq	%rax, %rdx
	callq	_request_firmware
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movq	-24(%rbp), %rax
	movl	(%rax), %esi
	testb	$3, %sil
	je	LBB0_4
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_wl1251_error
	movq	_EILSEQ@GOTPCREL(%rip), %rax
LBB0_7:
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_3:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_wl1251_error
	jmp	LBB0_9
LBB0_4:
	movl	4(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_kmemdup
	movl	%eax, 4(%r14)
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
LBB0_8:
	movq	-24(%rbp), %rdi
	callq	_release_firmware
LBB0_9:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_wl1251_error
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_WL1251_NVS_NAME,4,2            ## @WL1251_NVS_NAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not get nvs file: %d"

L_.str.1:                               ## @.str.1
	.asciz	"nvs size is not multiple of 32 bits: %zu"

	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.2:                               ## @.str.2
	.asciz	"could not allocate memory for the nvs file"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_wl1251_fetch_nvs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl1251_fetch_nvs
_wl1251_fetch_nvs:                      ; @wl1251_fetch_nvs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	bl	_wiphy_dev
	mov	x2, x0
Lloh0:
	adrp	x8, _WL1251_NVS_NAME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WL1251_NVS_NAME@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_request_firmware
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	x8, [sp, #8]
	ldr	w1, [x8]
	tst	w1, #0x3
	b.eq	LBB0_5
; %bb.2:
	str	x1, [sp]
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_wl1251_error
Lloh5:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_4:
	mov	x20, x0
	str	x20, [sp]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_wl1251_error
	b	LBB0_8
LBB0_5:
	ldr	w0, [x8, #4]
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_kmemdup
	str	w0, [x19, #4]
	cbz	w0, LBB0_9
; %bb.6:
	mov	w20, #0
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_7:
	ldr	x0, [sp, #8]
	bl	_release_firmware
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_9:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_wl1251_error
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_WL1251_NVS_NAME,4,2            ; @WL1251_NVS_NAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not get nvs file: %d"

l_.str.1:                               ; @.str.1
	.asciz	"nvs size is not multiple of 32 bits: %zu"

	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.2:                               ; @.str.2
	.asciz	"could not allocate memory for the nvs file"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_wl1251_fetch_nvs
.subsections_via_symbols
