	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_sdio_download_firmware
_brcmf_sdio_download_firmware:          ## @brcmf_sdio_download_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	%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
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movl	(%rax), %edi
	callq	_sdio_claim_host
	movq	_CLK_AVAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_brcmf_sdio_clkctl
	movl	(%r12), %edi
	callq	_get_unaligned_le32
	movl	%eax, %r13d
	movq	_SDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	callq	_brcmf_dbg
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_brcmf_sdio_download_code_file
	movl	%eax, %r14d
	movq	%r12, %rdi
	callq	_release_firmware
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_brcmf_err
	movq	%r15, %rdi
	callq	_brcmf_fw_nvram_free
	jmp	LBB0_7
LBB0_2:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_brcmf_sdio_download_nvram
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_brcmf_fw_nvram_free
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rdi
LBB0_6:
	callq	_brcmf_err
	jmp	LBB0_7
LBB0_4:
	movl	8(%rbx), %edi
	movl	%r13d, %esi
	callq	_brcmf_chip_set_active
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_5
LBB0_7:
	movq	_CLK_SDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_brcmf_sdio_clkctl
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_sdio_release_host
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_CLK_AVAIL,4,2                  ## @CLK_AVAIL
	.comm	_SDIO,4,2                       ## @SDIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"firmware rstvec: %x\n"

L_.str.1:                               ## @.str.1
	.asciz	"dongle image file download failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"dongle nvram file download failed\n"

L_.str.3:                               ## @.str.3
	.asciz	"error getting out of ARM core reset\n"

	.comm	_CLK_SDONLY,4,2                 ## @CLK_SDONLY
	.no_dead_strip	_brcmf_sdio_download_firmware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_sdio_download_firmware
_brcmf_sdio_download_firmware:          ; @brcmf_sdio_download_firmware
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x3
	mov	x20, x2
	mov	x24, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	w0, [x8]
	bl	_sdio_claim_host
Lloh0:
	adrp	x8, _CLK_AVAIL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CLK_AVAIL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_brcmf_sdio_clkctl
	ldr	w0, [x24]
	bl	_get_unaligned_le32
	mov	x23, x0
Lloh3:
	adrp	x8, _SDIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SDIO@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	bl	_brcmf_dbg
	mov	x0, x19
	mov	x1, x24
	bl	_brcmf_sdio_download_code_file
	mov	x21, x0
	mov	x0, x24
	bl	_release_firmware
	cbz	w21, LBB0_2
; %bb.1:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_brcmf_err
	mov	x0, x20
	bl	_brcmf_fw_nvram_free
	b	LBB0_7
LBB0_2:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_brcmf_sdio_download_nvram
	mov	x21, x0
	mov	x0, x20
	bl	_brcmf_fw_nvram_free
	cbz	w21, LBB0_4
; %bb.3:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_brcmf_err
	b	LBB0_7
LBB0_4:
	ldr	w0, [x19, #8]
	mov	x1, x23
	bl	_brcmf_chip_set_active
	cbnz	w0, LBB0_6
; %bb.5:
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_brcmf_err
LBB0_6:
	mov	w21, #0
LBB0_7:
Lloh14:
	adrp	x8, _CLK_SDONLY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CLK_SDONLY@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_brcmf_sdio_clkctl
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_sdio_release_host
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_CLK_AVAIL,4,2                  ; @CLK_AVAIL
	.comm	_SDIO,4,2                       ; @SDIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"firmware rstvec: %x\n"

l_.str.1:                               ; @.str.1
	.asciz	"dongle image file download failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"dongle nvram file download failed\n"

l_.str.3:                               ; @.str.3
	.asciz	"error getting out of ARM core reset\n"

	.comm	_CLK_SDONLY,4,2                 ; @CLK_SDONLY
	.no_dead_strip	_brcmf_sdio_download_firmware
.subsections_via_symbols
