	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bcm_phy_enable_apd             ## -- Begin function bcm_phy_enable_apd
	.p2align	4, 0x90
_bcm_phy_enable_apd:                    ## @bcm_phy_enable_apd
	.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
	movq	%rdi, %rbx
	testl	%esi, %esi
	je	LBB0_3
## %bb.1:
	movq	_BCM54XX_SHD_SCR3@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_bcm_phy_read_shadow
	testl	%eax, %eax
	js	LBB0_8
## %bb.2:
	movq	_BCM54XX_SHD_SCR3_DLLAPD_DIS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	%eax, %edx
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_bcm_phy_write_shadow
LBB0_3:
	movq	_BCM54XX_SHD_APD@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_bcm_phy_read_shadow
	testl	%eax, %eax
	js	LBB0_8
## %bb.4:
	movq	_BCM_APD_CLR_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	%eax, %edx
	movq	(%rbx), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.6:
	movq	_BCM54XX_SHD_APD_EN@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movq	_BCM_NO_ANEG_APD_EN@GOTPCREL(%rip), %rax
LBB0_7:
	orl	(%rax), %edx
	movq	_BCM_APD_SINGLELP_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	(%r14), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_bcm_phy_write_shadow           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BCM54XX_SHD_SCR3,4,2           ## @BCM54XX_SHD_SCR3
	.comm	_BCM54XX_SHD_SCR3_DLLAPD_DIS,4,2 ## @BCM54XX_SHD_SCR3_DLLAPD_DIS
	.comm	_BCM54XX_SHD_APD,4,2            ## @BCM54XX_SHD_APD
	.comm	_BCM_APD_CLR_MASK,4,2           ## @BCM_APD_CLR_MASK
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_BCM54XX_SHD_APD_EN,4,2         ## @BCM54XX_SHD_APD_EN
	.comm	_BCM_NO_ANEG_APD_EN,4,2         ## @BCM_NO_ANEG_APD_EN
	.comm	_BCM_APD_SINGLELP_EN,4,2        ## @BCM_APD_SINGLELP_EN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bcm_phy_enable_apd             ; -- Begin function bcm_phy_enable_apd
	.p2align	2
_bcm_phy_enable_apd:                    ; @bcm_phy_enable_apd
	.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
	mov	x19, x0
	cbz	w1, LBB0_3
; %bb.1:
Lloh0:
	adrp	x20, _BCM54XX_SHD_SCR3@GOTPAGE
Lloh1:
	ldr	x20, [x20, _BCM54XX_SHD_SCR3@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_bcm_phy_read_shadow
	tbnz	w0, #31, LBB0_5
; %bb.2:
Lloh2:
	adrp	x8, _BCM54XX_SHD_SCR3_DLLAPD_DIS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BCM54XX_SHD_SCR3_DLLAPD_DIS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w2, w8, w0
	ldr	w1, [x20]
	mov	x0, x19
	bl	_bcm_phy_write_shadow
LBB0_3:
Lloh5:
	adrp	x20, _BCM54XX_SHD_APD@GOTPAGE
Lloh6:
	ldr	x20, [x20, _BCM54XX_SHD_APD@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_bcm_phy_read_shadow
	tbnz	w0, #31, LBB0_5
; %bb.4:
Lloh7:
	adrp	x8, _BCM_APD_CLR_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BCM_APD_CLR_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh10:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
	ldr	x10, [x19]
Lloh12:
	ldr	x9, [x9]
Lloh13:
	adrp	x11, _BCM54XX_SHD_APD_EN@GOTPAGE
Lloh14:
	ldr	x11, [x11, _BCM54XX_SHD_APD_EN@GOTPAGEOFF]
Lloh15:
	adrp	x12, _BCM_NO_ANEG_APD_EN@GOTPAGE
Lloh16:
	ldr	x12, [x12, _BCM_NO_ANEG_APD_EN@GOTPAGEOFF]
	cmp	x10, x9
	csel	x9, x11, x12, eq
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh17:
	adrp	x9, _BCM_APD_SINGLELP_EN@GOTPAGE
Lloh18:
	ldr	x9, [x9, _BCM_APD_SINGLELP_EN@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w2, w8, w9
	ldr	w1, [x20]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_bcm_phy_write_shadow
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_BCM54XX_SHD_SCR3,4,2           ; @BCM54XX_SHD_SCR3
	.comm	_BCM54XX_SHD_SCR3_DLLAPD_DIS,4,2 ; @BCM54XX_SHD_SCR3_DLLAPD_DIS
	.comm	_BCM54XX_SHD_APD,4,2            ; @BCM54XX_SHD_APD
	.comm	_BCM_APD_CLR_MASK,4,2           ; @BCM_APD_CLR_MASK
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_BCM54XX_SHD_APD_EN,4,2         ; @BCM54XX_SHD_APD_EN
	.comm	_BCM_NO_ANEG_APD_EN,4,2         ; @BCM_NO_ANEG_APD_EN
	.comm	_BCM_APD_SINGLELP_EN,4,2        ; @BCM_APD_SINGLELP_EN
.subsections_via_symbols
