	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcms_b_phy_reset              ## -- Begin function brcms_b_phy_reset
	.p2align	4, 0x90
_brcms_b_phy_reset:                     ## @brcms_b_phy_reset
	.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	(%rdi), %rax
	movq	8(%rax), %r14
	movl	12(%rdi), %edi
	movl	8(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_brcms_dbg_info
	testq	%r14, %r14
	je	LBB0_7
## %bb.1:
	movq	(%rbx), %rax
	movq	8(%rax), %rdi
	callq	_wlc_phy_clk_bwbits
	movl	%eax, %r15d
	movq	(%rbx), %rdi
	callq	_BRCMS_ISNPHY
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movl	$3, %esi
	callq	_NREV_GE
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movl	$4, %esi
	callq	_NREV_LE
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_SICF_BWMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_brcms_b_core_ioctl
	movl	$1, %edi
	callq	_udelay
	movq	%rbx, %rdi
	callq	_brcms_b_core_phypll_reset
	movq	_SICF_PRST@GOTPCREL(%rip), %rax
	movq	_SICF_PCLKE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%edx, %esi
	jmp	LBB0_6
LBB0_5:
	movq	_SICF_PRST@GOTPCREL(%rip), %rax
	movq	_SICF_PCLKE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_SICF_BWMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	%edx, %esi
	orl	%r15d, %edx
	movq	%rbx, %rdi
LBB0_6:
	callq	_brcms_b_core_ioctl
	movl	$2, %edi
	callq	_udelay
	movq	_ON@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_brcms_b_core_phy_clk
	movl	(%r15), %esi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wlc_phy_anacore                ## TAILCALL
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wl%d: reset phy\n"

	.comm	_SICF_BWMASK,4,2                ## @SICF_BWMASK
	.comm	_SICF_PRST,4,2                  ## @SICF_PRST
	.comm	_SICF_PCLKE,4,2                 ## @SICF_PCLKE
	.comm	_ON,4,2                         ## @ON
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcms_b_phy_reset              ; -- Begin function brcms_b_phy_reset
	.p2align	2
_brcms_b_phy_reset:                     ; @brcms_b_phy_reset
	.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	x20, x0
	ldr	x8, [x0]
	ldr	x19, [x8, #8]
	ldr	w0, [x0, #12]
	ldr	w2, [x20, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcms_dbg_info
	cbz	x19, LBB0_7
; %bb.1:
	ldr	x8, [x20]
	ldr	x0, [x8, #8]
	bl	_wlc_phy_clk_bwbits
	mov	x21, x0
	ldr	x0, [x20]
	bl	_BRCMS_ISNPHY
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x8, [x20]
	ldr	w0, [x8]
	mov	w1, #3
	bl	_NREV_GE
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x8, [x20]
	ldr	w0, [x8]
	mov	w1, #4
	bl	_NREV_LE
	cbz	x0, LBB0_5
; %bb.4:
Lloh2:
	adrp	x8, _SICF_BWMASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SICF_BWMASK@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_brcms_b_core_ioctl
	mov	w0, #1
	bl	_udelay
	mov	x0, x20
	bl	_brcms_b_core_phypll_reset
Lloh5:
	adrp	x8, _SICF_PRST@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SICF_PRST@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _SICF_PCLKE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SICF_PCLKE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x20
	mov	x2, x1
	b	LBB0_6
LBB0_5:
Lloh11:
	adrp	x8, _SICF_PRST@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SICF_PRST@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _SICF_PCLKE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SICF_PCLKE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh17:
	adrp	x9, _SICF_BWMASK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SICF_BWMASK@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w1, w8, w9
	orr	w2, w8, w21
	mov	x0, x20
LBB0_6:
	bl	_brcms_b_core_ioctl
	mov	w0, #2
	bl	_udelay
Lloh20:
	adrp	x21, _ON@GOTPAGE
Lloh21:
	ldr	x21, [x21, _ON@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_brcms_b_core_phy_clk
	ldr	w1, [x21]
	mov	x0, x19
	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
	b	_wlc_phy_anacore
LBB0_7:
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wl%d: reset phy\n"

	.comm	_SICF_BWMASK,4,2                ; @SICF_BWMASK
	.comm	_SICF_PRST,4,2                  ; @SICF_PRST
	.comm	_SICF_PCLKE,4,2                 ; @SICF_PCLKE
	.comm	_ON,4,2                         ; @ON
.subsections_via_symbols
