	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_sdio_download_code_file
_brcmf_sdio_download_code_file:         ## @brcmf_sdio_download_code_file
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_brcmf_dbg
	movl	8(%r15), %edi
	movq	(%r15), %rax
	movl	(%rax), %edx
	movq	(%r14), %r8
	movq	8(%r14), %rcx
	movl	$1, %esi
	callq	_brcmf_sdiod_ramrw
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	(%r14), %edx
	movq	(%r15), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	callq	_brcmf_err
	jmp	LBB0_4
LBB0_2:
	movl	8(%r15), %edi
	movq	(%r15), %rax
	movl	(%rax), %esi
	movq	(%r14), %rcx
	movq	8(%r14), %rdx
	callq	_brcmf_sdio_verifymemory
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRACE,4,2                      ## @TRACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enter\n"

L_.str.1:                               ## @.str.1
	.asciz	"error %d on writing %d membytes at 0x%08x\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_brcmf_sdio_download_code_file
.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_code_file
_brcmf_sdio_download_code_file:         ; @brcmf_sdio_download_code_file
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _TRACE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TRACE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcmf_dbg
	ldr	w0, [x20, #8]
	ldr	x8, [x20]
	ldr	w2, [x8]
	ldp	x4, x3, [x19]
	mov	w1, #1
	bl	_brcmf_sdiod_ramrw
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	w2, [x19]
	ldr	x8, [x20]
	ldr	w3, [x8]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_brcmf_err
	b	LBB0_5
LBB0_2:
	ldr	w0, [x20, #8]
	ldr	x8, [x20]
	ldr	w1, [x8]
	ldp	x3, x2, [x19]
	bl	_brcmf_sdio_verifymemory
	cbz	w0, LBB0_4
; %bb.3:
	mov	w21, #0
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x21
	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
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_TRACE,4,2                      ; @TRACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enter\n"

l_.str.1:                               ; @.str.1
	.asciz	"error %d on writing %d membytes at 0x%08x\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_brcmf_sdio_download_code_file
.subsections_via_symbols
