	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcma_pcicore_serdes_workaround
_bcma_pcicore_serdes_workaround:        ## @bcma_pcicore_serdes_workaround
	.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	_BCMA_CORE_PCI_MDIODATA_DEV_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_BCMA_CORE_PCI_SERDES_RX_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	callq	_bcma_pcicore_polarity_workaround
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_bcma_pcie_mdio_write
	movq	_BCMA_CORE_PCI_MDIODATA_DEV_PLL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_BCMA_CORE_PCI_SERDES_PLL_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_bcma_pcie_mdio_read
	movq	_BCMA_CORE_PCI_PLL_CTRL_FREQDET_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_1
## %bb.2:
	movl	(%r14), %esi
	movl	(%r15), %edx
	notl	%ecx
	andl	%ecx, %eax
	movq	%rbx, %rdi
	movl	%eax, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bcma_pcie_mdio_write           ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BCMA_CORE_PCI_MDIODATA_DEV_RX,4,2 ## @BCMA_CORE_PCI_MDIODATA_DEV_RX
	.comm	_BCMA_CORE_PCI_SERDES_RX_CTRL,4,2 ## @BCMA_CORE_PCI_SERDES_RX_CTRL
	.comm	_BCMA_CORE_PCI_MDIODATA_DEV_PLL,4,2 ## @BCMA_CORE_PCI_MDIODATA_DEV_PLL
	.comm	_BCMA_CORE_PCI_SERDES_PLL_CTRL,4,2 ## @BCMA_CORE_PCI_SERDES_PLL_CTRL
	.comm	_BCMA_CORE_PCI_PLL_CTRL_FREQDET_EN,4,2 ## @BCMA_CORE_PCI_PLL_CTRL_FREQDET_EN
	.no_dead_strip	_bcma_pcicore_serdes_workaround
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcma_pcicore_serdes_workaround
_bcma_pcicore_serdes_workaround:        ; @bcma_pcicore_serdes_workaround
	.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
Lloh0:
	adrp	x8, _BCMA_CORE_PCI_MDIODATA_DEV_RX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BCMA_CORE_PCI_MDIODATA_DEV_RX@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x8, _BCMA_CORE_PCI_SERDES_RX_CTRL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BCMA_CORE_PCI_SERDES_RX_CTRL@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	bl	_bcma_pcicore_polarity_workaround
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_bcma_pcie_mdio_write
Lloh6:
	adrp	x20, _BCMA_CORE_PCI_MDIODATA_DEV_PLL@GOTPAGE
Lloh7:
	ldr	x20, [x20, _BCMA_CORE_PCI_MDIODATA_DEV_PLL@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh8:
	adrp	x21, _BCMA_CORE_PCI_SERDES_PLL_CTRL@GOTPAGE
Lloh9:
	ldr	x21, [x21, _BCMA_CORE_PCI_SERDES_PLL_CTRL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_bcma_pcie_mdio_read
Lloh10:
	adrp	x8, _BCMA_CORE_PCI_PLL_CTRL_FREQDET_EN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BCMA_CORE_PCI_PLL_CTRL_FREQDET_EN@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	ldr	w1, [x20]
	ldr	w2, [x21]
	bic	w3, w0, w8
	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	_bcma_pcie_mdio_write
LBB0_2:
	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	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BCMA_CORE_PCI_MDIODATA_DEV_RX,4,2 ; @BCMA_CORE_PCI_MDIODATA_DEV_RX
	.comm	_BCMA_CORE_PCI_SERDES_RX_CTRL,4,2 ; @BCMA_CORE_PCI_SERDES_RX_CTRL
	.comm	_BCMA_CORE_PCI_MDIODATA_DEV_PLL,4,2 ; @BCMA_CORE_PCI_MDIODATA_DEV_PLL
	.comm	_BCMA_CORE_PCI_SERDES_PLL_CTRL,4,2 ; @BCMA_CORE_PCI_SERDES_PLL_CTRL
	.comm	_BCMA_CORE_PCI_PLL_CTRL_FREQDET_EN,4,2 ; @BCMA_CORE_PCI_PLL_CTRL_FREQDET_EN
	.no_dead_strip	_bcma_pcicore_serdes_workaround
.subsections_via_symbols
