	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcma_pcie_mdio_set_phy
_bcma_pcie_mdio_set_phy:                ## @bcma_pcie_mdio_set_phy
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_BCMA_CORE_PCI_MDIODATA_START@GOTPCREL(%rip), %rax
	movq	_BCMA_CORE_PCI_MDIODATA_DEV_ADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_BCMA_CORE_PCI_MDIODATA_DEVADDR_SHF@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movq	_BCMA_CORE_PCI_MDIODATA_WRITE@GOTPCREL(%rip), %rdi
	movq	_BCMA_CORE_PCI_MDIODATA_BLK_ADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movq	_BCMA_CORE_PCI_MDIODATA_REGADDR_SHF@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	movq	_BCMA_CORE_PCI_MDIODATA_TA@GOTPCREL(%rip), %rcx
	shll	$4, %esi
	orl	(%rax), %esi
	orl	(%rdi), %esi
	orl	%esi, %edx
	orl	%ebx, %edx
	orl	(%rcx), %edx
	movq	_BCMA_CORE_PCI_MDIO_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pcicore_write32
	movl	$10, %edi
	callq	_udelay
	movl	$200, %ebx
	movq	_BCMA_CORE_PCI_MDIO_CONTROL@GOTPCREL(%rip), %r15
	movq	_BCMA_CORE_PCI_MDIOCTL_ACCESS_DONE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_pcicore_read32
	testl	%eax, (%r12)
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	decl	%ebx
	jne	LBB0_1
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BCMA_CORE_PCI_MDIODATA_START,4,2 ## @BCMA_CORE_PCI_MDIODATA_START
	.comm	_BCMA_CORE_PCI_MDIODATA_WRITE,4,2 ## @BCMA_CORE_PCI_MDIODATA_WRITE
	.comm	_BCMA_CORE_PCI_MDIODATA_DEV_ADDR,4,2 ## @BCMA_CORE_PCI_MDIODATA_DEV_ADDR
	.comm	_BCMA_CORE_PCI_MDIODATA_DEVADDR_SHF,4,2 ## @BCMA_CORE_PCI_MDIODATA_DEVADDR_SHF
	.comm	_BCMA_CORE_PCI_MDIODATA_BLK_ADDR,4,2 ## @BCMA_CORE_PCI_MDIODATA_BLK_ADDR
	.comm	_BCMA_CORE_PCI_MDIODATA_REGADDR_SHF,4,2 ## @BCMA_CORE_PCI_MDIODATA_REGADDR_SHF
	.comm	_BCMA_CORE_PCI_MDIODATA_TA,4,2  ## @BCMA_CORE_PCI_MDIODATA_TA
	.comm	_BCMA_CORE_PCI_MDIO_DATA,4,2    ## @BCMA_CORE_PCI_MDIO_DATA
	.comm	_BCMA_CORE_PCI_MDIO_CONTROL,4,2 ## @BCMA_CORE_PCI_MDIO_CONTROL
	.comm	_BCMA_CORE_PCI_MDIOCTL_ACCESS_DONE,4,2 ## @BCMA_CORE_PCI_MDIOCTL_ACCESS_DONE
	.no_dead_strip	_bcma_pcie_mdio_set_phy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcma_pcie_mdio_set_phy
_bcma_pcie_mdio_set_phy:                ; @bcma_pcie_mdio_set_phy
	.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_START@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BCMA_CORE_PCI_MDIODATA_START@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _BCMA_CORE_PCI_MDIODATA_WRITE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BCMA_CORE_PCI_MDIODATA_WRITE@GOTPAGEOFF]
Lloh5:
	adrp	x10, _BCMA_CORE_PCI_MDIODATA_DEV_ADDR@GOTPAGE
Lloh6:
	ldr	x10, [x10, _BCMA_CORE_PCI_MDIODATA_DEV_ADDR@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	ldr	w10, [x10]
Lloh9:
	adrp	x11, _BCMA_CORE_PCI_MDIODATA_DEVADDR_SHF@GOTPAGE
Lloh10:
	ldr	x11, [x11, _BCMA_CORE_PCI_MDIODATA_DEVADDR_SHF@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	lsl	w10, w10, w11
Lloh12:
	adrp	x11, _BCMA_CORE_PCI_MDIODATA_BLK_ADDR@GOTPAGE
Lloh13:
	ldr	x11, [x11, _BCMA_CORE_PCI_MDIODATA_BLK_ADDR@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
Lloh15:
	adrp	x12, _BCMA_CORE_PCI_MDIODATA_REGADDR_SHF@GOTPAGE
Lloh16:
	ldr	x12, [x12, _BCMA_CORE_PCI_MDIODATA_REGADDR_SHF@GOTPAGEOFF]
Lloh17:
	ldr	w12, [x12]
	lsl	w11, w11, w12
Lloh18:
	adrp	x12, _BCMA_CORE_PCI_MDIODATA_TA@GOTPAGE
Lloh19:
	ldr	x12, [x12, _BCMA_CORE_PCI_MDIODATA_TA@GOTPAGEOFF]
Lloh20:
	ldr	w12, [x12]
	orr	w8, w8, w1, lsl #4
	orr	w8, w8, w9
	orr	w8, w8, w10
	orr	w8, w8, w11
	orr	w2, w8, w12
Lloh21:
	adrp	x8, _BCMA_CORE_PCI_MDIO_DATA@GOTPAGE
Lloh22:
	ldr	x8, [x8, _BCMA_CORE_PCI_MDIO_DATA@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_pcicore_write32
	mov	w0, #10
	bl	_udelay
	mov	w20, #200
Lloh24:
	adrp	x21, _BCMA_CORE_PCI_MDIO_CONTROL@GOTPAGE
Lloh25:
	ldr	x21, [x21, _BCMA_CORE_PCI_MDIO_CONTROL@GOTPAGEOFF]
Lloh26:
	adrp	x22, _BCMA_CORE_PCI_MDIOCTL_ACCESS_DONE@GOTPAGE
Lloh27:
	ldr	x22, [x22, _BCMA_CORE_PCI_MDIOCTL_ACCESS_DONE@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	bl	_pcicore_read32
	ldr	w8, [x22]
	tst	w8, w0
	b.ne	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	subs	w20, w20, #1
	b.ne	LBB0_1
LBB0_3:
	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 AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BCMA_CORE_PCI_MDIODATA_START,4,2 ; @BCMA_CORE_PCI_MDIODATA_START
	.comm	_BCMA_CORE_PCI_MDIODATA_WRITE,4,2 ; @BCMA_CORE_PCI_MDIODATA_WRITE
	.comm	_BCMA_CORE_PCI_MDIODATA_DEV_ADDR,4,2 ; @BCMA_CORE_PCI_MDIODATA_DEV_ADDR
	.comm	_BCMA_CORE_PCI_MDIODATA_DEVADDR_SHF,4,2 ; @BCMA_CORE_PCI_MDIODATA_DEVADDR_SHF
	.comm	_BCMA_CORE_PCI_MDIODATA_BLK_ADDR,4,2 ; @BCMA_CORE_PCI_MDIODATA_BLK_ADDR
	.comm	_BCMA_CORE_PCI_MDIODATA_REGADDR_SHF,4,2 ; @BCMA_CORE_PCI_MDIODATA_REGADDR_SHF
	.comm	_BCMA_CORE_PCI_MDIODATA_TA,4,2  ; @BCMA_CORE_PCI_MDIODATA_TA
	.comm	_BCMA_CORE_PCI_MDIO_DATA,4,2    ; @BCMA_CORE_PCI_MDIO_DATA
	.comm	_BCMA_CORE_PCI_MDIO_CONTROL,4,2 ; @BCMA_CORE_PCI_MDIO_CONTROL
	.comm	_BCMA_CORE_PCI_MDIOCTL_ACCESS_DONE,4,2 ; @BCMA_CORE_PCI_MDIOCTL_ACCESS_DONE
	.no_dead_strip	_bcma_pcie_mdio_set_phy
.subsections_via_symbols
