	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl1251_fetch_firmware
_wl1251_fetch_firmware:                 ## @wl1251_fetch_firmware
	.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_FW_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	%esi, (%r14)
	movl	%esi, %edi
	callq	_vmalloc
	movl	%eax, 4(%r14)
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movq	-24(%rbp), %rcx
	movl	4(%rcx), %esi
	movl	(%r14), %edx
	movl	%eax, %edi
	callq	_memcpy
	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_FW_NAME,4,2             ## @WL1251_FW_NAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not get firmware: %d"

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

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

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl1251_fetch_firmware
_wl1251_fetch_firmware:                 ; @wl1251_fetch_firmware
	.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_FW_NAME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WL1251_FW_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	w0, [x8]
	tst	w0, #0x3
	b.eq	LBB0_5
; %bb.2:
	str	x0, [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:
	str	w0, [x19]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_vmalloc
	str	w0, [x19, #4]
	cbz	w0, LBB0_9
; %bb.6:
	ldr	x8, [sp, #8]
	ldr	w1, [x8, #4]
	ldr	w2, [x19]
	bl	_memcpy
	mov	w20, #0
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:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_wl1251_error
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	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 AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_WL1251_FW_NAME,4,2             ; @WL1251_FW_NAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not get firmware: %d"

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

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

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