	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcmgenet_power_down
_bcmgenet_power_down:                   ## @bcmgenet_power_down
	.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
	cmpl	$128, %esi
	je	LBB0_4
## %bb.1:
	cmpl	$129, %esi
	je	LBB0_5
## %bb.2:
	cmpl	$130, %esi
	jne	LBB0_10
## %bb.3:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_phy_detach
	jmp	LBB0_10
LBB0_4:
	movq	%rbx, %rdi
	movl	$128, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bcmgenet_wol_power_down_cfg    ## TAILCALL
LBB0_5:
	movq	8(%rbx), %rax
	movq	_GENET_HAS_EXT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_10
## %bb.6:
	movq	_EXT_EXT_PWR_MGMT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_bcmgenet_ext_readl
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_GENET_IS_V5
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	_EXT_PWR_DOWN_PHY_EN@GOTPCREL(%rip), %rax
	movq	_EXT_PWR_DOWN_PHY_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_EXT_PWR_DOWN_PHY_SD@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_EXT_PWR_DOWN_PHY_RX@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_EXT_PWR_DOWN_PHY_TX@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_EXT_IDDQ_GLBL_PWR@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	jmp	LBB0_9
LBB0_8:
	movq	_EXT_PWR_DOWN_PHY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_9:
	movq	_EXT_PWR_DOWN_DLL@GOTPCREL(%rip), %rax
	orl	%r14d, %esi
	orl	(%rax), %esi
	movq	_EXT_PWR_DOWN_BIAS@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_bcmgenet_ext_writel
	movq	(%rbx), %rdi
	xorl	%esi, %esi
	callq	_bcmgenet_phy_power_set
LBB0_10:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GENET_HAS_EXT,4,2              ## @GENET_HAS_EXT
	.comm	_EXT_EXT_PWR_MGMT,4,2           ## @EXT_EXT_PWR_MGMT
	.comm	_EXT_PWR_DOWN_PHY_EN,4,2        ## @EXT_PWR_DOWN_PHY_EN
	.comm	_EXT_PWR_DOWN_PHY_RD,4,2        ## @EXT_PWR_DOWN_PHY_RD
	.comm	_EXT_PWR_DOWN_PHY_SD,4,2        ## @EXT_PWR_DOWN_PHY_SD
	.comm	_EXT_PWR_DOWN_PHY_RX,4,2        ## @EXT_PWR_DOWN_PHY_RX
	.comm	_EXT_PWR_DOWN_PHY_TX,4,2        ## @EXT_PWR_DOWN_PHY_TX
	.comm	_EXT_IDDQ_GLBL_PWR,4,2          ## @EXT_IDDQ_GLBL_PWR
	.comm	_EXT_PWR_DOWN_PHY,4,2           ## @EXT_PWR_DOWN_PHY
	.comm	_EXT_PWR_DOWN_DLL,4,2           ## @EXT_PWR_DOWN_DLL
	.comm	_EXT_PWR_DOWN_BIAS,4,2          ## @EXT_PWR_DOWN_BIAS
	.no_dead_strip	_bcmgenet_power_down
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcmgenet_power_down
_bcmgenet_power_down:                   ; @bcmgenet_power_down
	.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
	cmp	w1, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w1, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w1, #130
	b.ne	LBB0_10
; %bb.3:
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_phy_detach
	b	LBB0_10
LBB0_4:
	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	_bcmgenet_wol_power_down_cfg
LBB0_5:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _GENET_HAS_EXT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GENET_HAS_EXT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.6:
Lloh3:
	adrp	x21, _EXT_EXT_PWR_MGMT@GOTPAGE
Lloh4:
	ldr	x21, [x21, _EXT_EXT_PWR_MGMT@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_bcmgenet_ext_readl
	mov	x20, x0
	mov	x0, x19
	bl	_GENET_IS_V5
	cb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_PWR_DOWN_BIAS@GOTPAGE
Lloh29:
	ldr	x10, [x10, _EXT_PWR_DOWN_BIAS@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
Lloh31:
	ldr	w10, [x10]
	orr	w8, w8, w20
	orr	w8, w8, w9
	orr	w1, w8, w10
	ldr	w2, [x21]
	mov	x0, x19
	bl	_bcmgenet_ext_writel
	ldr	x0, [x19]
	mov	w1, #0
	bl	_bcmgenet_phy_power_set
LBB0_10:
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_GENET_HAS_EXT,4,2              ; @GENET_HAS_EXT
	.comm	_EXT_EXT_PWR_MGMT,4,2           ; @EXT_EXT_PWR_MGMT
	.comm	_EXT_PWR_DOWN_PHY_EN,4,2        ; @EXT_PWR_DOWN_PHY_EN
	.comm	_EXT_PWR_DOWN_PHY_RD,4,2        ; @EXT_PWR_DOWN_PHY_RD
	.comm	_EXT_PWR_DOWN_PHY_SD,4,2        ; @EXT_PWR_DOWN_PHY_SD
	.comm	_EXT_PWR_DOWN_PHY_RX,4,2        ; @EXT_PWR_DOWN_PHY_RX
	.comm	_EXT_PWR_DOWN_PHY_TX,4,2        ; @EXT_PWR_DOWN_PHY_TX
	.comm	_EXT_IDDQ_GLBL_PWR,4,2          ; @EXT_IDDQ_GLBL_PWR
	.comm	_EXT_PWR_DOWN_PHY,4,2           ; @EXT_PWR_DOWN_PHY
	.comm	_EXT_PWR_DOWN_DLL,4,2           ; @EXT_PWR_DOWN_DLL
	.comm	_EXT_PWR_DOWN_BIAS,4,2          ; @EXT_PWR_DOWN_BIAS
	.no_dead_strip	_bcmgenet_power_down
.subsections_via_symbols
