	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcms_b_down_finish
_brcms_b_down_finish:                   ## @brcms_b_down_finish
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpl	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movl	$0, (%rdi)
	movq	40(%rdi), %rax
	movl	(%rax), %edi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_wlc_phy_hw_state_upd
	movq	32(%rbx), %rdi
	callq	_brcms_deviceremoved
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	$0, 4(%rbx)
	movq	40(%rbx), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_wlc_phy_hw_clk_state_upd
	movq	32(%rbx), %rdi
	callq	_brcms_c_flushqueues
	jmp	LBB0_11
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_11
LBB0_4:
	movq	16(%rbx), %rdi
	callq	_bcma_core_is_enabled
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	16(%rbx), %r14
	movq	_maccontrol@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_D11REGOFFS
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_bcma_read32
	movq	_MCTL_EN_MAC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.7:
	movq	32(%rbx), %rdi
	callq	_brcms_c_suspend_mac_and_wait
LBB0_8:
	movq	32(%rbx), %rax
	movl	(%rax), %edi
	callq	_brcms_reset
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_brcms_c_coredisable
	cmpl	$0, 24(%rbx)
	jne	LBB0_11
LBB0_10:
	movq	16(%rbx), %rax
	movl	(%rax), %edi
	callq	_bcma_host_pci_down
	movq	_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_brcms_b_xtal
LBB0_11:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	xorl	%r14d, %r14d
	cmpl	$0, 24(%rbx)
	jne	LBB0_11
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_maccontrol,4,2                 ## @maccontrol
	.comm	_MCTL_EN_MAC,4,2                ## @MCTL_EN_MAC
	.comm	_OFF,4,2                        ## @OFF
	.no_dead_strip	_brcms_b_down_finish
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcms_b_down_finish
_brcms_b_down_finish:                   ; @brcms_b_down_finish
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x0]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x0
	str	wzr, [x0]
	ldr	x8, [x0, #40]
	ldr	w0, [x8]
	mov	w1, #0
	bl	_wlc_phy_hw_state_upd
	ldr	x0, [x19, #32]
	bl	_brcms_deviceremoved
	cbz	w0, LBB0_5
; %bb.2:
	stp	wzr, wzr, [x19, #4]
	ldr	x8, [x19, #40]
	ldr	w0, [x8]
	mov	w1, #0
	bl	_wlc_phy_hw_clk_state_upd
	ldr	x0, [x19, #32]
	bl	_brcms_c_flushqueues
LBB0_3:
	mov	w20, #0
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	x0, [x19, #16]
	bl	_bcma_core_is_enabled
	cbz	x0, LBB0_9
; %bb.6:
	ldr	x20, [x19, #16]
Lloh0:
	adrp	x8, _maccontrol@GOTPAGE
Lloh1:
	ldr	x8, [x8, _maccontrol@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_D11REGOFFS
	mov	x1, x0
	mov	x0, x20
	bl	_bcma_read32
Lloh3:
	adrp	x8, _MCTL_EN_MAC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MCTL_EN_MAC@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_8
; %bb.7:
	ldr	x0, [x19, #32]
	bl	_brcms_c_suspend_mac_and_wait
LBB0_8:
	ldr	x8, [x19, #32]
	ldr	w0, [x8]
	bl	_brcms_reset
	mov	x20, x0
	mov	x0, x19
	bl	_brcms_c_coredisable
	ldr	w8, [x19, #24]
	cbnz	w8, LBB0_4
	b	LBB0_10
LBB0_9:
	mov	w20, #0
	ldr	w8, [x19, #24]
	cbnz	w8, LBB0_4
LBB0_10:
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	bl	_bcma_host_pci_down
Lloh6:
	adrp	x8, _OFF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OFF@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_brcms_b_xtal
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_maccontrol,4,2                 ; @maccontrol
	.comm	_MCTL_EN_MAC,4,2                ; @MCTL_EN_MAC
	.comm	_OFF,4,2                        ; @OFF
	.no_dead_strip	_brcms_b_down_finish
.subsections_via_symbols
