	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcms_b_hw_up
_brcms_b_hw_up:                         ## @brcms_b_hw_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	16(%rdi), %rax
	movq	(%rax), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %rbx
	movl	32(%rdi), %edx
	movl	36(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_brcms_dbg_info
	movq	_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_brcms_b_xtal
	movl	12(%rbx), %edi
	callq	_ai_clkctl_init
	movq	_BCMA_CLKMODE_FAST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_brcms_b_clkctl_clk
	movq	24(%rbx), %rax
	movl	(%rax), %edi
	callq	_wlc_phy_por_inform
	movl	$0, (%rbx)
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movl	$1, (%rax)
	movq	_BFL_FEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	je	LBB0_5
## %bb.2:
	movl	12(%rbx), %edi
	callq	_ai_get_chip_id
	movq	_BCMA_CHIP_ID_BCM4313@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	cmpl	$4688, 8(%rbx)                  ## imm = 0x1250
	jl	LBB0_6
## %bb.4:
	movq	_BFL_FEM_BT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	jne	LBB0_5
LBB0_6:
	movl	12(%rbx), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ai_epa_4313war                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wl%d\n"

	.comm	_ON,4,2                         ## @ON
	.comm	_BCMA_CLKMODE_FAST,4,2          ## @BCMA_CLKMODE_FAST
	.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
	.no_dead_strip	_brcms_b_hw_up
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcms_b_hw_up
_brcms_b_hw_up:                         ; @brcms_b_hw_up
	.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	x8, [x0, #16]
	ldr	x8, [x8]
	ldr	w8, [x8]
	cbz	w8, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x0
	ldr	w0, [x0, #36]
	ldr	w2, [x19, #32]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcms_dbg_info
Lloh2:
	adrp	x8, _ON@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ON@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_brcms_b_xtal
	ldr	w0, [x19, #12]
	bl	_ai_clkctl_init
Lloh5:
	adrp	x8, _BCMA_CLKMODE_FAST@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BCMA_CLKMODE_FAST@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_brcms_b_clkctl_clk
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	bl	_wlc_phy_por_inform
	str	wzr, [x19]
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	mov	w9, #1
	str	w9, [x8]
	ldr	w8, [x19, #4]
Lloh8:
	adrp	x9, _BFL_FEM@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BFL_FEM@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_1
; %bb.3:
	ldr	w0, [x19, #12]
	bl	_ai_get_chip_id
Lloh11:
	adrp	x8, _BCMA_CHIP_ID_BCM4313@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BCMA_CHIP_ID_BCM4313@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_1
; %bb.4:
	ldr	w8, [x19, #8]
	mov	w9, #4688
	cmp	w8, w9
	b.lt	LBB0_6
; %bb.5:
	ldr	w8, [x19, #4]
Lloh14:
	adrp	x9, _BFL_FEM_BT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _BFL_FEM_BT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_1
LBB0_6:
	ldr	w0, [x19, #12]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ai_epa_4313war
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wl%d\n"

	.comm	_ON,4,2                         ; @ON
	.comm	_BCMA_CLKMODE_FAST,4,2          ; @BCMA_CLKMODE_FAST
	.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
	.no_dead_strip	_brcms_b_hw_up
.subsections_via_symbols
