	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function emac_mdio_write
_emac_mdio_write:                       ## @emac_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	movq	_EMAC_PHY_STS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r15), %rdi
	movl	%ecx, %ebx
	movl	%edx, %r14d
	movl	%esi, %edx
	movq	_PHY_ADDR_BMSK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PHY_ADDR_SHFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edx
	callq	_emac_reg_update32
	movq	_MDIO_CLK_25_4@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_MDIO_CLK_SEL_SHFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_MDIO_CLK_SEL_BMSK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_SUP_PREAMBLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_MDIO_REG_ADDR_SHFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r14d
	movq	_MDIO_REG_ADDR_BMSK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r14d
	movq	_MDIO_DATA_SHFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	movq	_MDIO_DATA_BMSK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	orl	%r14d, %ebx
	orl	%eax, %ebx
	movq	_MDIO_START@GOTPCREL(%rip), %r14
	orl	(%r14), %ebx
	movq	_EMAC_MDIO_CTRL@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	(%r12), %rdi
	addq	(%r15), %rdi
	movq	_MDIO_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%r14), %eax
	xorl	%edx, %edx
	testl	%ebx, %eax
	sete	%dl
	movq	_MDIO_STATUS_DELAY_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_MDIO_WAIT_TIMES@GOTPCREL(%rip), %rax
	imull	$100, (%rax), %r8d
	movl	%ebx, %esi
	callq	_readl_poll_timeout
	movq	_EIO@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	subl	(%rdx), %ecx
	xorl	%edx, %edx
	testq	%rax, %rax
	cmovel	%edx, %ecx
	movl	%ecx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EMAC_PHY_STS,8,3               ## @EMAC_PHY_STS
	.comm	_PHY_ADDR_BMSK,4,2              ## @PHY_ADDR_BMSK
	.comm	_PHY_ADDR_SHFT,4,2              ## @PHY_ADDR_SHFT
	.comm	_SUP_PREAMBLE,4,2               ## @SUP_PREAMBLE
	.comm	_MDIO_CLK_25_4,4,2              ## @MDIO_CLK_25_4
	.comm	_MDIO_CLK_SEL_SHFT,4,2          ## @MDIO_CLK_SEL_SHFT
	.comm	_MDIO_CLK_SEL_BMSK,4,2          ## @MDIO_CLK_SEL_BMSK
	.comm	_MDIO_REG_ADDR_SHFT,4,2         ## @MDIO_REG_ADDR_SHFT
	.comm	_MDIO_REG_ADDR_BMSK,4,2         ## @MDIO_REG_ADDR_BMSK
	.comm	_MDIO_DATA_SHFT,4,2             ## @MDIO_DATA_SHFT
	.comm	_MDIO_DATA_BMSK,4,2             ## @MDIO_DATA_BMSK
	.comm	_MDIO_START,4,2                 ## @MDIO_START
	.comm	_EMAC_MDIO_CTRL,8,3             ## @EMAC_MDIO_CTRL
	.comm	_MDIO_BUSY,4,2                  ## @MDIO_BUSY
	.comm	_MDIO_STATUS_DELAY_TIME,4,2     ## @MDIO_STATUS_DELAY_TIME
	.comm	_MDIO_WAIT_TIMES,4,2            ## @MDIO_WAIT_TIMES
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_emac_mdio_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function emac_mdio_write
_emac_mdio_write:                       ; @emac_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	x19, x3
	mov	x20, x2
	ldr	x21, [x0]
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _EMAC_PHY_STS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EMAC_PHY_STS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _PHY_ADDR_BMSK@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PHY_ADDR_BMSK@GOTPAGEOFF]
	add	x0, x9, x8
Lloh5:
	ldr	w8, [x10]
Lloh6:
	adrp	x9, _PHY_ADDR_SHFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PHY_ADDR_SHFT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	lsl	w2, w1, w9
	mov	x1, x8
	bl	_emac_reg_update32
Lloh9:
	adrp	x8, _SUP_PREAMBLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SUP_PREAMBLE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _MDIO_CLK_25_4@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MDIO_CLK_25_4@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _MDIO_CLK_SEL_SHFT@GOTPAGE
Lloh16:
	ldr	x10, [x10, _MDIO_CLK_SEL_SHFT@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	lsl	w9, w9, w10
Lloh18:
	adrp	x10, _MDIO_CLK_SEL_BMSK@GOTPAGE
Lloh19:
	ldr	x10, [x10, _MDIO_CLK_SEL_BMSK@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	and	w9, w9, w10
	orr	w8, w9, w8
Lloh21:
	adrp	x9, _MDIO_REG_ADDR_SHFT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MDIO_REG_ADDR_SHFT@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	lsl	w9, w20, w9
Lloh24:
	adrp	x10, _MDIO_REG_ADDR_BMSK@GOTPAGE
Lloh25:
	ldr	x10, [x10, _MDIO_REG_ADDR_BMSK@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	and	w9, w9, w10
	orr	w8, w8, w9
Lloh27:
	adrp	x9, _MDIO_DATA_SHFT@GOTPAGE
Lloh28:
	ldr	x9, [x9, _MDIO_DATA_SHFT@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	lsl	w9, w19, w9
Lloh30:
	adrp	x10, _MDIO_DATA_BMSK@GOTPAGE
Lloh31:
	ldr	x10, [x10, _MDIO_DATA_BMSK@GOTPAGEOFF]
Lloh32:
	ldr	w10, [x10]
	and	w9, w9, w10
	orr	w8, w8, w9
Lloh33:
	adrp	x20, _MDIO_START@GOTPAGE
Lloh34:
	ldr	x20, [x20, _MDIO_START@GOTPAGEOFF]
	ldr	w9, [x20]
	orr	w19, w8, w9
	ldr	x8, [x21]
Lloh35:
	adrp	x22, _EMAC_MDIO_CTRL@GOTPAGE
Lloh36:
	ldr	x22, [x22, _EMAC_MDIO_CTRL@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	x0, x19
	bl	_writel
	ldr	x8, [x21]
	ldr	x9, [x22]
	add	x0, x9, x8
	ldr	w8, [x20]
Lloh37:
	adrp	x9, _MDIO_BUSY@GOTPAGE
Lloh38:
	ldr	x9, [x9, _MDIO_BUSY@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w19
	cset	w2, eq
Lloh40:
	adrp	x8, _MDIO_STATUS_DELAY_TIME@GOTPAGE
Lloh41:
	ldr	x8, [x8, _MDIO_STATUS_DELAY_TIME@GOTPAGEOFF]
Lloh42:
	ldr	w3, [x8]
Lloh43:
	adrp	x8, _MDIO_WAIT_TIMES@GOTPAGE
Lloh44:
	ldr	x8, [x8, _MDIO_WAIT_TIMES@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	mov	w9, #100
	mul	w4, w8, w9
	mov	x1, x19
	bl	_readl_poll_timeout
Lloh46:
	adrp	x8, _EIO@GOTPAGE
Lloh47:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	cmp	x0, #0
	csneg	w0, wzr, w8, eq
	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	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EMAC_PHY_STS,8,3               ; @EMAC_PHY_STS
	.comm	_PHY_ADDR_BMSK,4,2              ; @PHY_ADDR_BMSK
	.comm	_PHY_ADDR_SHFT,4,2              ; @PHY_ADDR_SHFT
	.comm	_SUP_PREAMBLE,4,2               ; @SUP_PREAMBLE
	.comm	_MDIO_CLK_25_4,4,2              ; @MDIO_CLK_25_4
	.comm	_MDIO_CLK_SEL_SHFT,4,2          ; @MDIO_CLK_SEL_SHFT
	.comm	_MDIO_CLK_SEL_BMSK,4,2          ; @MDIO_CLK_SEL_BMSK
	.comm	_MDIO_REG_ADDR_SHFT,4,2         ; @MDIO_REG_ADDR_SHFT
	.comm	_MDIO_REG_ADDR_BMSK,4,2         ; @MDIO_REG_ADDR_BMSK
	.comm	_MDIO_DATA_SHFT,4,2             ; @MDIO_DATA_SHFT
	.comm	_MDIO_DATA_BMSK,4,2             ; @MDIO_DATA_BMSK
	.comm	_MDIO_START,4,2                 ; @MDIO_START
	.comm	_EMAC_MDIO_CTRL,8,3             ; @EMAC_MDIO_CTRL
	.comm	_MDIO_BUSY,4,2                  ; @MDIO_BUSY
	.comm	_MDIO_STATUS_DELAY_TIME,4,2     ; @MDIO_STATUS_DELAY_TIME
	.comm	_MDIO_WAIT_TIMES,4,2            ; @MDIO_WAIT_TIMES
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_emac_mdio_write
.subsections_via_symbols
