	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcma_pcie_mdio_write
_bcma_pcie_mdio_write:                  ## @bcma_pcie_mdio_write
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	_BCMA_CORE_PCI_MDIOCTL_PREAM_EN@GOTPCREL(%rip), %rax
	movq	_BCMA_CORE_PCI_MDIOCTL_DIVISOR_VAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_BCMA_CORE_PCI_MDIO_CONTROL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_pcicore_write32
	movq	(%r13), %rax
	movl	$10, %ebx
	cmpl	$10, (%rax)
	jl	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_bcma_pcie_mdio_set_phy
	movl	$200, %ebx
LBB0_2:
	movq	_BCMA_CORE_PCI_MDIODATA_START@GOTPCREL(%rip), %rax
	movq	_BCMA_CORE_PCI_MDIODATA_WRITE@GOTPCREL(%rip), %rcx
	movq	_BCMA_CORE_PCI_MDIODATA_TA@GOTPCREL(%rip), %rdx
	orl	(%rax), %r14d
	orl	(%rcx), %r14d
	orl	(%rdx), %r14d
	movq	_BCMA_CORE_PCI_MDIO_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_pcicore_write32
	movl	$10, %edi
	callq	_udelay
	movq	_BCMA_CORE_PCI_MDIOCTL_ACCESS_DONE@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_pcicore_read32
	testl	%eax, (%r14)
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	decl	%ebx
	jne	LBB0_3
LBB0_5:
	movl	(%r12), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pcicore_write32                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BCMA_CORE_PCI_MDIOCTL_PREAM_EN,4,2 ## @BCMA_CORE_PCI_MDIOCTL_PREAM_EN
	.comm	_BCMA_CORE_PCI_MDIOCTL_DIVISOR_VAL,4,2 ## @BCMA_CORE_PCI_MDIOCTL_DIVISOR_VAL
	.comm	_BCMA_CORE_PCI_MDIO_CONTROL,4,2 ## @BCMA_CORE_PCI_MDIO_CONTROL
	.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_REGADDR_SHF,4,2 ## @BCMA_CORE_PCI_MDIODATA_REGADDR_SHF
	.comm	_BCMA_CORE_PCI_MDIODATA_DEVADDR_SHF_OLD,4,2 ## @BCMA_CORE_PCI_MDIODATA_DEVADDR_SHF_OLD
	.comm	_BCMA_CORE_PCI_MDIODATA_REGADDR_SHF_OLD,4,2 ## @BCMA_CORE_PCI_MDIODATA_REGADDR_SHF_OLD
	.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_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_MDIOCTL_ACCESS_DONE,4,2 ## @BCMA_CORE_PCI_MDIOCTL_ACCESS_DONE
	.no_dead_strip	_bcma_pcie_mdio_write
.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_write
_bcma_pcie_mdio_write:                  ; @bcma_pcie_mdio_write
	.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, x3
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _BCMA_CORE_PCI_MDIOCTL_PREAM_EN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BCMA_CORE_PCI_MDIOCTL_PREAM_EN@GOTPAGEOFF]
Lloh2:
	adrp	x9, _BCMA_CORE_PCI_MDIOCTL_DIVISOR_VAL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BCMA_CORE_PCI_MDIOCTL_DIVISOR_VAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh6:
	adrp	x22, _BCMA_CORE_PCI_MDIO_CONTROL@GOTPAGE
Lloh7:
	ldr	x22, [x22, _BCMA_CORE_PCI_MDIO_CONTROL@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_pcicore_write32
	ldr	x8, [x19]
	ldr	w8, [x8]
	cmp	w8, #10
	b.lt	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x21
	bl	_bcma_pcie_mdio_set_phy
	mov	w21, #200
	b	LBB0_3
LBB0_2:
	mov	w21, #10
LBB0_3:
Lloh8:
	adrp	x8, _BCMA_CORE_PCI_MDIODATA_START@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BCMA_CORE_PCI_MDIODATA_START@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _BCMA_CORE_PCI_MDIODATA_WRITE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BCMA_CORE_PCI_MDIODATA_WRITE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _BCMA_CORE_PCI_MDIODATA_TA@GOTPAGE
Lloh15:
	ldr	x10, [x10, _BCMA_CORE_PCI_MDIODATA_TA@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	orr	w8, w8, w20
	orr	w8, w8, w9
	orr	w2, w8, w10
Lloh17:
	adrp	x8, _BCMA_CORE_PCI_MDIO_DATA@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BCMA_CORE_PCI_MDIO_DATA@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pcicore_write32
	mov	w0, #10
	bl	_udelay
Lloh20:
	adrp	x20, _BCMA_CORE_PCI_MDIOCTL_ACCESS_DONE@GOTPAGE
Lloh21:
	ldr	x20, [x20, _BCMA_CORE_PCI_MDIOCTL_ACCESS_DONE@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_pcicore_read32
	ldr	w8, [x20]
	tst	w8, w0
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	subs	w21, w21, #1
	b.ne	LBB0_4
LBB0_6:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #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
	b	_pcicore_write32
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_BCMA_CORE_PCI_MDIOCTL_PREAM_EN,4,2 ; @BCMA_CORE_PCI_MDIOCTL_PREAM_EN
	.comm	_BCMA_CORE_PCI_MDIOCTL_DIVISOR_VAL,4,2 ; @BCMA_CORE_PCI_MDIOCTL_DIVISOR_VAL
	.comm	_BCMA_CORE_PCI_MDIO_CONTROL,4,2 ; @BCMA_CORE_PCI_MDIO_CONTROL
	.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_REGADDR_SHF,4,2 ; @BCMA_CORE_PCI_MDIODATA_REGADDR_SHF
	.comm	_BCMA_CORE_PCI_MDIODATA_DEVADDR_SHF_OLD,4,2 ; @BCMA_CORE_PCI_MDIODATA_DEVADDR_SHF_OLD
	.comm	_BCMA_CORE_PCI_MDIODATA_REGADDR_SHF_OLD,4,2 ; @BCMA_CORE_PCI_MDIODATA_REGADDR_SHF_OLD
	.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_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_MDIOCTL_ACCESS_DONE,4,2 ; @BCMA_CORE_PCI_MDIOCTL_ACCESS_DONE
	.no_dead_strip	_bcma_pcie_mdio_write
.subsections_via_symbols
