	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stmmac_mdio_write
_stmmac_mdio_write:                     ## @stmmac_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, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	(%rdi), %rdi
	callq	_netdev_priv
	movq	%rax, %r12
	movq	16(%rax), %rdx
	movb	8(%rdx), %cl
	shll	%cl, %r14d
	movl	(%rdx), %r15d
	movq	_MII_BUSY@GOTPCREL(%rip), %rsi
	andl	12(%rdx), %r14d
	movl	16(%rdx), %eax
	movl	%r13d, %edi
	movl	%eax, %ecx
	shll	%cl, %edi
	orl	(%rsi), %r14d
	movl	20(%rdx), %esi
	movl	(%r12), %ebx
	movb	24(%rdx), %cl
	shll	%cl, %ebx
	andl	%esi, %edi
	andl	28(%rdx), %ebx
	orl	%edi, %ebx
	orl	%r14d, %ebx
	movq	24(%r12), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_3
## %bb.1:
	movq	_MII_GMAC4_WRITE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	movq	_MII_ADDR_C45@GOTPCREL(%rip), %rcx
	testl	%r13d, (%rcx)
	je	LBB0_4
## %bb.2:
	movq	_MII_GMAC4_C45E@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	movq	_MII_DEVADDR_C45_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%r13d, %edi
	sarl	%cl, %edi
	movl	%eax, %ecx
	shll	%cl, %edi
	xorl	%ebx, %edi
	andl	%esi, %edi
	xorl	%edi, %ebx
	movq	_MII_REGADDR_C45_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r13d
	movq	_MII_GMAC4_REG_ADDR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r13d
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	orl	%r13d, %eax
	movl	%eax, %r13d
	jmp	LBB0_5
LBB0_3:
	movq	_MII_WRITE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_4:
	movl	-44(%rbp), %r13d                ## 4-byte Reload
LBB0_5:
	movl	4(%rdx), %r14d
	movq	8(%r12), %rdi
	addq	%r15, %rdi
	movl	$1, %edx
	movl	$100, %ecx
	movl	$10000, %r8d                    ## imm = 0x2710
	callq	_readl_poll_timeout
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	addq	8(%r12), %r14
	movl	%r13d, %edi
	movq	%r14, %rsi
	callq	_writel
	movq	8(%r12), %rsi
	addq	%r15, %rsi
	movl	%ebx, %edi
	callq	_writel
	addq	8(%r12), %r15
	movq	%r15, %rdi
	movl	$1, %edx
	movl	$100, %ecx
	movl	$10000, %r8d                    ## imm = 0x2710
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_readl_poll_timeout             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_BUSY,4,2                   ## @MII_BUSY
	.comm	_MII_GMAC4_WRITE,4,2            ## @MII_GMAC4_WRITE
	.comm	_MII_ADDR_C45,4,2               ## @MII_ADDR_C45
	.comm	_MII_GMAC4_C45E,4,2             ## @MII_GMAC4_C45E
	.comm	_MII_DEVADDR_C45_SHIFT,4,2      ## @MII_DEVADDR_C45_SHIFT
	.comm	_MII_REGADDR_C45_MASK,4,2       ## @MII_REGADDR_C45_MASK
	.comm	_MII_GMAC4_REG_ADDR_SHIFT,4,2   ## @MII_GMAC4_REG_ADDR_SHIFT
	.comm	_MII_WRITE,4,2                  ## @MII_WRITE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_stmmac_mdio_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stmmac_mdio_write
_stmmac_mdio_write:                     ; @stmmac_mdio_write
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	ldr	x0, [x0]
	bl	_netdev_priv
	mov	x19, x0
Lloh0:
	adrp	x8, _MII_BUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MII_BUSY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	ldp	x8, x12, [x0, #16]
	ldp	w10, w11, [x8, #8]
	lsl	w10, w22, w10
	and	w10, w10, w11
	orr	w11, w10, w9
	ldp	w10, w9, [x8, #16]
	lsl	w13, w21, w10
	and	w13, w13, w9
	orr	w11, w11, w13
	ldr	w13, [x0]
	ldp	w14, w15, [x8, #24]
	lsl	w13, w13, w14
	and	w13, w13, w15
	ldr	w23, [x8]
	orr	w11, w11, w13
	ldr	x12, [x12]
	cbz	x12, LBB0_3
; %bb.1:
Lloh3:
	adrp	x12, _MII_GMAC4_WRITE@GOTPAGE
Lloh4:
	ldr	x12, [x12, _MII_GMAC4_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x12]
	orr	w22, w12, w11
Lloh6:
	adrp	x11, _MII_ADDR_C45@GOTPAGE
Lloh7:
	ldr	x11, [x11, _MII_ADDR_C45@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	tst	w11, w21
	b.eq	LBB0_4
; %bb.2:
Lloh9:
	adrp	x11, _MII_GMAC4_C45E@GOTPAGE
Lloh10:
	ldr	x11, [x11, _MII_GMAC4_C45E@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	orr	w11, w11, w22
	bic	w11, w11, w9
Lloh12:
	adrp	x12, _MII_DEVADDR_C45_SHIFT@GOTPAGE
Lloh13:
	ldr	x12, [x12, _MII_DEVADDR_C45_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w12, [x12]
	asr	w12, w21, w12
	lsl	w10, w12, w10
	and	w9, w10, w9
	orr	w22, w9, w11
Lloh15:
	adrp	x9, _MII_REGADDR_C45_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MII_REGADDR_C45_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	and	w9, w9, w21
Lloh18:
	adrp	x10, _MII_GMAC4_REG_ADDR_SHIFT@GOTPAGE
Lloh19:
	ldr	x10, [x10, _MII_GMAC4_REG_ADDR_SHIFT@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w20, w9, w20
	b	LBB0_4
LBB0_3:
Lloh21:
	adrp	x9, _MII_WRITE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MII_WRITE@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w22, w9, w11
LBB0_4:
	ldr	w21, [x8, #4]
	ldr	x8, [x19, #8]
	add	x0, x8, x23
	mov	w2, #1
	mov	w3, #100
	mov	w4, #10000
	bl	_readl_poll_timeout
	cbz	w0, LBB0_6
; %bb.5:
Lloh24:
	adrp	x8, _EBUSY@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	x8, [x19, #8]
	add	x1, x8, x21
	mov	x0, x20
	bl	_writel
	ldr	x8, [x19, #8]
	add	x1, x8, x23
	mov	x0, x22
	bl	_writel
	ldr	x8, [x19, #8]
	add	x0, x8, x23
	mov	w2, #1
	mov	w3, #100
	mov	w4, #10000
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_readl_poll_timeout
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_BUSY,4,2                   ; @MII_BUSY
	.comm	_MII_GMAC4_WRITE,4,2            ; @MII_GMAC4_WRITE
	.comm	_MII_ADDR_C45,4,2               ; @MII_ADDR_C45
	.comm	_MII_GMAC4_C45E,4,2             ; @MII_GMAC4_C45E
	.comm	_MII_DEVADDR_C45_SHIFT,4,2      ; @MII_DEVADDR_C45_SHIFT
	.comm	_MII_REGADDR_C45_MASK,4,2       ; @MII_REGADDR_C45_MASK
	.comm	_MII_GMAC4_REG_ADDR_SHIFT,4,2   ; @MII_GMAC4_REG_ADDR_SHIFT
	.comm	_MII_WRITE,4,2                  ; @MII_WRITE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_stmmac_mdio_write
.subsections_via_symbols
