	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcms_c_up                     ## -- Begin function brcms_c_up
	.p2align	4, 0x90
_brcms_c_up:                            ## @brcms_c_up
	.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	%rdi, %rbx
	movq	32(%rdi), %rax
	movq	40(%rdi), %rcx
	movl	(%rax), %edi
	movl	32(%rcx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_brcms_dbg_info
	movq	40(%rbx), %rax
	cmpq	$0, 40(%rax)
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_brcms_deviceremoved
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movq	_ENOMEDIUM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	40(%rbx), %rax
	cmpl	$0, (%rax)
	jne	LBB0_5
## %bb.4:
	movq	32(%rbx), %rdi
	callq	_brcms_b_hw_up
	movq	40(%rbx), %rax
	movl	$1, (%rax)
LBB0_5:
	movq	_BFL_FEM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%rax)
	je	LBB0_12
## %bb.6:
	movq	32(%rbx), %rax
	movl	4(%rax), %edi
	callq	_ai_get_chip_id
	movq	_BCMA_CHIP_ID_BCM4313@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.7:
	movq	40(%rbx), %rax
	cmpl	$4688, 8(%rax)                  ## imm = 0x1250
	jl	LBB0_10
## %bb.8:
	movq	_BFL_FEM_BT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%rax)
	je	LBB0_10
## %bb.9:
	movq	32(%rbx), %rdi
	movq	_MHF5@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MHF5_4313_GPIOCTRL@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_10:
	movq	32(%rbx), %rdi
	movq	_MHF4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MHF4_EXTPA_ENABLE@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %ecx
	movq	_BRCM_BAND_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%ecx, %edx
	callq	_brcms_b_mhf
LBB0_12:
	movq	40(%rbx), %rax
	cmpq	$0, 24(%rax)
	jne	LBB0_18
## %bb.13:
	movq	32(%rbx), %rdi
	callq	_brcms_b_up_prep
	movq	_ENOMEDIUM@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	jne	LBB0_18
## %bb.14:
	movq	40(%rbx), %rax
	movq	24(%rax), %rdi
	movq	_WL_RADIO_HW_DISABLE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_mboolisset
	testl	%eax, %eax
	jne	LBB0_18
## %bb.15:
	movq	40(%rbx), %rax
	movq	56(%rbx), %r15
	movq	24(%rax), %rdi
	movl	(%r14), %esi
	callq	_mboolset
	movq	(%r15), %rax
	movq	_BRCMS_TYPE_STATION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_17
## %bb.16:
	movq	_BRCMS_TYPE_ADHOC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
LBB0_17:
	movq	32(%rbx), %rax
	movq	40(%rbx), %rcx
	movl	(%rax), %edi
	movl	32(%rcx), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_brcms_err
LBB0_18:
	movq	40(%rbx), %rax
	cmpq	$0, 24(%rax)
	je	LBB0_20
## %bb.19:
	movq	%rbx, %rdi
	callq	_brcms_c_radio_monitor_start
	jmp	LBB0_23
LBB0_20:
	movl	$1, (%rbx)
	movq	%rbx, %rdi
	callq	_brcms_c_radio_monitor_stop
	movq	32(%rbx), %rdi
	movq	_MHF1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MHF1_EDCF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_BRCM_BAND_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%ecx, %edx
	callq	_brcms_b_mhf
	movl	48(%rbx), %edi
	callq	_brcms_init
	movq	40(%rbx), %rax
	movl	$1, 12(%rax)
	cmpl	$0, 4(%rbx)
	je	LBB0_22
## %bb.21:
	movq	16(%rax), %rax
	movq	(%rax), %r14
	movq	%rbx, %rdi
	callq	_brcms_c_suspend_mac_and_wait
	movl	(%r14), %edi
	callq	_ch20mhz_chspec
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_brcms_c_set_chanspec
	movl	$0, 4(%rbx)
	movq	%rbx, %rdi
	callq	_brcms_c_enable_mac
LBB0_22:
	movq	32(%rbx), %rdi
	callq	_brcms_b_up_finish
	movq	%rbx, %rdi
	callq	_brcms_c_wme_retries_write
	movl	24(%rbx), %edi
	movq	_TIMER_INTERVAL_WATCHDOG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_brcms_add_timer
	movl	$1, 8(%rbx)
	movq	%rbx, %rdi
	callq	_brcms_c_stf_phy_txant_upd
	movq	16(%rbx), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_brcms_c_ht_update_ldpc
LBB0_23:
	xorl	%eax, %eax
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wl%d\n"

	.comm	_ENOMEDIUM,4,2                  ## @ENOMEDIUM
	.comm	_BFL_FEM,4,2                    ## @BFL_FEM
	.comm	_BCMA_CHIP_ID_BCM4313,8,3       ## @BCMA_CHIP_ID_BCM4313
	.comm	_BFL_FEM_BT,4,2                 ## @BFL_FEM_BT
	.comm	_MHF5,4,2                       ## @MHF5
	.comm	_MHF5_4313_GPIOCTRL,4,2         ## @MHF5_4313_GPIOCTRL
	.comm	_BRCM_BAND_ALL,4,2              ## @BRCM_BAND_ALL
	.comm	_MHF4,4,2                       ## @MHF4
	.comm	_MHF4_EXTPA_ENABLE,4,2          ## @MHF4_EXTPA_ENABLE
	.comm	_WL_RADIO_HW_DISABLE,4,2        ## @WL_RADIO_HW_DISABLE
	.comm	_BRCMS_TYPE_STATION,8,3         ## @BRCMS_TYPE_STATION
	.comm	_BRCMS_TYPE_ADHOC,8,3           ## @BRCMS_TYPE_ADHOC
L_.str.1:                               ## @.str.1
	.asciz	"wl%d: up: rfdisable -> bsscfg_disable()\n"

	.comm	_MHF1,4,2                       ## @MHF1
	.comm	_MHF1_EDCF,4,2                  ## @MHF1_EDCF
	.comm	_TIMER_INTERVAL_WATCHDOG,4,2    ## @TIMER_INTERVAL_WATCHDOG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcms_c_up                     ; -- Begin function brcms_c_up
	.p2align	2
_brcms_c_up:                            ; @brcms_c_up
	.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, x0
	ldp	x8, x9, [x0, #32]
	ldr	w0, [x8]
	ldr	w2, [x9, #32]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcms_dbg_info
	ldr	x8, [x19, #40]
	ldr	x8, [x8, #40]
	cbnz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_brcms_deviceremoved
	cbz	x0, LBB0_4
LBB0_2:
Lloh2:
	adrp	x8, _ENOMEDIUM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEDIUM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
LBB0_4:
	ldr	x8, [x19, #40]
	ldr	w9, [x8]
	cbnz	w9, LBB0_6
; %bb.5:
	ldr	x0, [x19, #32]
	bl	_brcms_b_hw_up
	ldr	x8, [x19, #40]
	mov	w9, #1
	str	w9, [x8]
LBB0_6:
	ldr	w8, [x8, #4]
Lloh5:
	adrp	x9, _BFL_FEM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BFL_FEM@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.7:
	ldr	x8, [x19, #32]
	ldr	w0, [x8, #4]
	bl	_ai_get_chip_id
Lloh8:
	adrp	x8, _BCMA_CHIP_ID_BCM4313@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BCMA_CHIP_ID_BCM4313@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.8:
	ldr	x8, [x19, #40]
	ldr	w9, [x8, #8]
	mov	w10, #4688
	cmp	w9, w10
	b.lt	LBB0_11
; %bb.9:
	ldr	w8, [x8, #4]
Lloh11:
	adrp	x9, _BFL_FEM_BT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BFL_FEM_BT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	ldr	x0, [x19, #32]
Lloh14:
	adrp	x8, _MHF5@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MHF5@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _MHF5_4313_GPIOCTRL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MHF5_4313_GPIOCTRL@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
	ldr	x0, [x19, #32]
Lloh19:
	adrp	x8, _MHF4@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MHF4@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x8, _MHF4_EXTPA_ENABLE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MHF4_EXTPA_ENABLE@GOTPAGEOFF]
LBB0_12:
	ldr	w2, [x8]
Lloh24:
	adrp	x8, _BRCM_BAND_ALL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _BRCM_BAND_ALL@GOTPAGEOFF]
Lloh26:
	ldr	w4, [x8]
	mov	x3, x2
	bl	_brcms_b_mhf
LBB0_13:
	ldr	x8, [x19, #40]
	ldr	x8, [x8, #24]
	cbnz	x8, LBB0_19
; %bb.14:
	ldr	x0, [x19, #32]
	bl	_brcms_b_up_prep
Lloh27:
	adrp	x8, _ENOMEDIUM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOMEDIUM@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_19
; %bb.15:
	ldr	x8, [x19, #40]
	ldr	x0, [x8, #24]
Lloh30:
	adrp	x20, _WL_RADIO_HW_DISABLE@GOTPAGE
Lloh31:
	ldr	x20, [x20, _WL_RADIO_HW_DISABLE@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_mboolisset
	cbnz	w0, LBB0_19
; %bb.16:
	ldr	x21, [x19, #56]
	ldr	x8, [x19, #40]
	ldr	x0, [x8, #24]
	ldr	w1, [x20]
	bl	_mboolset
	ldr	x8, [x21]
Lloh32:
	adrp	x9, _BRCMS_TYPE_STATION@GOTPAGE
Lloh33:
	ldr	x9, [x9, _BRCMS_TYPE_STATION@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_18
; %bb.17:
Lloh35:
	adrp	x9, _BRCMS_TYPE_ADHOC@GOTPAGE
Lloh36:
	ldr	x9, [x9, _BRCMS_TYPE_ADHOC@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_19
LBB0_18:
	ldp	x8, x9, [x19, #32]
	ldr	w0, [x8]
	ldr	w2, [x9, #32]
Lloh38:
	adrp	x1, l_.str.1@PAGE
Lloh39:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_brcms_err
LBB0_19:
	ldr	x8, [x19, #40]
	ldr	x8, [x8, #24]
	cbz	x8, LBB0_21
; %bb.20:
	mov	x0, x19
	bl	_brcms_c_radio_monitor_start
	b	LBB0_24
LBB0_21:
	mov	w20, #1
	str	w20, [x19]
	mov	x0, x19
	bl	_brcms_c_radio_monitor_stop
	ldr	x0, [x19, #32]
Lloh40:
	adrp	x8, _MHF1@GOTPAGE
Lloh41:
	ldr	x8, [x8, _MHF1@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
Lloh43:
	adrp	x8, _MHF1_EDCF@GOTPAGE
Lloh44:
	ldr	x8, [x8, _MHF1_EDCF@GOTPAGEOFF]
Lloh45:
	ldr	w2, [x8]
Lloh46:
	adrp	x8, _BRCM_BAND_ALL@GOTPAGE
Lloh47:
	ldr	x8, [x8, _BRCM_BAND_ALL@GOTPAGEOFF]
Lloh48:
	ldr	w4, [x8]
	mov	x3, x2
	bl	_brcms_b_mhf
	ldr	w0, [x19, #48]
	bl	_brcms_init
	ldr	x8, [x19, #40]
	str	w20, [x8, #12]
	ldr	w9, [x19, #4]
	cbz	w9, LBB0_23
; %bb.22:
	ldr	x8, [x8, #16]
	ldr	x21, [x8]
	mov	x0, x19
	bl	_brcms_c_suspend_mac_and_wait
	ldr	w0, [x21]
	bl	_ch20mhz_chspec
	mov	x1, x0
	mov	x0, x19
	bl	_brcms_c_set_chanspec
	str	wzr, [x19, #4]
	mov	x0, x19
	bl	_brcms_c_enable_mac
LBB0_23:
	ldr	x0, [x19, #32]
	bl	_brcms_b_up_finish
	mov	x0, x19
	bl	_brcms_c_wme_retries_write
	ldr	w0, [x19, #24]
Lloh49:
	adrp	x8, _TIMER_INTERVAL_WATCHDOG@GOTPAGE
Lloh50:
	ldr	x8, [x8, _TIMER_INTERVAL_WATCHDOG@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_brcms_add_timer
	str	w20, [x19, #8]
	mov	x0, x19
	bl	_brcms_c_stf_phy_txant_upd
	ldr	x8, [x19, #16]
	ldr	w1, [x8]
	mov	x0, x19
	bl	_brcms_c_ht_update_ldpc
LBB0_24:
	mov	w0, #0
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wl%d\n"

	.comm	_ENOMEDIUM,4,2                  ; @ENOMEDIUM
	.comm	_BFL_FEM,4,2                    ; @BFL_FEM
	.comm	_BCMA_CHIP_ID_BCM4313,8,3       ; @BCMA_CHIP_ID_BCM4313
	.comm	_BFL_FEM_BT,4,2                 ; @BFL_FEM_BT
	.comm	_MHF5,4,2                       ; @MHF5
	.comm	_MHF5_4313_GPIOCTRL,4,2         ; @MHF5_4313_GPIOCTRL
	.comm	_BRCM_BAND_ALL,4,2              ; @BRCM_BAND_ALL
	.comm	_MHF4,4,2                       ; @MHF4
	.comm	_MHF4_EXTPA_ENABLE,4,2          ; @MHF4_EXTPA_ENABLE
	.comm	_WL_RADIO_HW_DISABLE,4,2        ; @WL_RADIO_HW_DISABLE
	.comm	_BRCMS_TYPE_STATION,8,3         ; @BRCMS_TYPE_STATION
	.comm	_BRCMS_TYPE_ADHOC,8,3           ; @BRCMS_TYPE_ADHOC
l_.str.1:                               ; @.str.1
	.asciz	"wl%d: up: rfdisable -> bsscfg_disable()\n"

	.comm	_MHF1,4,2                       ; @MHF1
	.comm	_MHF1_EDCF,4,2                  ; @MHF1_EDCF
	.comm	_TIMER_INTERVAL_WATCHDOG,4,2    ; @TIMER_INTERVAL_WATCHDOG
.subsections_via_symbols
