	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_usb_dlneeded
_brcmf_usb_dlneeded:                    ## @brcmf_usb_dlneeded
	.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
	movq	%rdi, %r14
	movq	_USB@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_brcmf_dbg
	testq	%r14, %r14
	je	LBB0_4
## %bb.1:
	movl	$57005, %edi                    ## imm = 0xDEAD
	callq	_cpu_to_le32
	movl	%eax, -44(%rbp)
	movq	_DL_GETVER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movl	$8, %ecx
	callq	_brcmf_usb_dl_cmd
	movl	-44(%rbp), %edi
	callq	_le32_to_cpu
	movl	%eax, %ebx
	movl	-48(%rbp), %edi
	callq	_le32_to_cpu
	movl	%eax, %r12d
	movl	%ebx, %eax
	notl	%eax
	testl	$17152, %eax                    ## imm = 0x4300
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rsi
	cmoveq	%rax, %rsi
	xorl	%r15d, %r15d
	movl	%ebx, %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_brcmf_dbg
	movq	_BRCMF_POSTBOOT_ID@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_3
## %bb.2:
	movl	(%r13), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_brcmf_dbg
	movq	_DL_RESETCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movl	$8, %ecx
	callq	_brcmf_usb_dl_cmd
	jmp	LBB0_4
LBB0_3:
	movl	%ebx, (%r14)
	movl	%r12d, 4(%r14)
	movl	$1, %r15d
LBB0_4:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USB,4,2                        ## @USB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enter\n"

	.comm	_DL_GETVER,4,2                  ## @DL_GETVER
L_.str.1:                               ## @.str.1
	.asciz	"chip %x rev 0x%x\n"

L_.str.2:                               ## @.str.2
	.asciz	"chip %d rev 0x%x\n"

	.comm	_BRCMF_POSTBOOT_ID,4,2          ## @BRCMF_POSTBOOT_ID
L_.str.3:                               ## @.str.3
	.asciz	"firmware already downloaded\n"

	.comm	_DL_RESETCFG,4,2                ## @DL_RESETCFG
	.no_dead_strip	_brcmf_usb_dlneeded
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_usb_dlneeded
_brcmf_usb_dlneeded:                    ; @brcmf_usb_dlneeded
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x0
Lloh0:
	adrp	x22, _USB@GOTPAGE
Lloh1:
	ldr	x22, [x22, _USB@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcmf_dbg
	cbz	x19, LBB0_3
; %bb.1:
	mov	w0, #57005
	bl	_cpu_to_le32
	str	w0, [sp, #28]
Lloh4:
	adrp	x8, _DL_GETVER@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DL_GETVER@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	add	x2, sp, #24
	mov	x0, x19
	mov	w3, #8
	bl	_brcmf_usb_dl_cmd
	ldr	w0, [sp, #28]
	bl	_le32_to_cpu
	mov	x20, x0
	ldr	w0, [sp, #24]
	bl	_le32_to_cpu
	mov	x21, x0
Lloh7:
	adrp	x8, l_.str.2@PAGE
Lloh8:
	add	x8, x8, l_.str.2@PAGEOFF
	ldr	w0, [x22]
Lloh9:
	adrp	x9, l_.str.1@PAGE
Lloh10:
	add	x9, x9, l_.str.1@PAGEOFF
	mov	w10, #17152
	bics	wzr, w10, w20
	csel	x1, x9, x8, eq
	stp	x20, x21, [sp]
	bl	_brcmf_dbg
Lloh11:
	adrp	x8, _BRCMF_POSTBOOT_ID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BRCMF_POSTBOOT_ID@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_4
; %bb.2:
	ldr	w0, [x22]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_brcmf_dbg
Lloh16:
	adrp	x8, _DL_RESETCFG@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DL_RESETCFG@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	add	x2, sp, #24
	mov	x0, x19
	mov	w3, #8
	bl	_brcmf_usb_dl_cmd
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	stp	w20, w21, [x19]
	mov	w0, #1
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_USB,4,2                        ; @USB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enter\n"

	.comm	_DL_GETVER,4,2                  ; @DL_GETVER
l_.str.1:                               ; @.str.1
	.asciz	"chip %x rev 0x%x\n"

l_.str.2:                               ; @.str.2
	.asciz	"chip %d rev 0x%x\n"

	.comm	_BRCMF_POSTBOOT_ID,4,2          ; @BRCMF_POSTBOOT_ID
l_.str.3:                               ; @.str.3
	.asciz	"firmware already downloaded\n"

	.comm	_DL_RESETCFG,4,2                ; @DL_RESETCFG
	.no_dead_strip	_brcmf_usb_dlneeded
.subsections_via_symbols
