	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgene_mii_phy_write
_xgene_mii_phy_write:                   ## @xgene_mii_phy_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
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movq	%rdi, %r14
	movl	%esi, %edi
	callq	_PHY_ADDR
	movl	%eax, %ebx
	movl	%r12d, %edi
	callq	_REG_ADDR
	orl	%eax, %ebx
	movq	_MII_MGMT_ADDRESS_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_xgene_enet_wr_mac
	movl	%r15d, %edi
	callq	_PHY_CONTROL
	movq	_MII_MGMT_CONTROL_ADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_xgene_enet_wr_mac
	movq	_MII_MGMT_INDICATORS_ADDR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_xgene_enet_rd_mac
	movq	_BUSY_MASK@GOTPCREL(%rip), %rbx
	testl	%eax, (%rbx)
	je	LBB0_10
## %bb.1:
	movl	$10, %edi
	movl	$20, %esi
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_xgene_enet_rd_mac
	testl	%eax, (%rbx)
	je	LBB0_10
## %bb.2:
	movl	$10, %edi
	movl	$20, %esi
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_xgene_enet_rd_mac
	testl	%eax, (%rbx)
	je	LBB0_10
## %bb.3:
	movl	$10, %edi
	movl	$20, %esi
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_xgene_enet_rd_mac
	testl	%eax, (%rbx)
	je	LBB0_10
## %bb.4:
	movl	$10, %edi
	movl	$20, %esi
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_xgene_enet_rd_mac
	testl	%eax, (%rbx)
	je	LBB0_10
## %bb.5:
	movl	$10, %edi
	movl	$20, %esi
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_xgene_enet_rd_mac
	testl	%eax, (%rbx)
	je	LBB0_10
## %bb.6:
	movl	$10, %edi
	movl	$20, %esi
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_xgene_enet_rd_mac
	testl	%eax, (%rbx)
	je	LBB0_10
## %bb.7:
	movl	$10, %edi
	movl	$20, %esi
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_xgene_enet_rd_mac
	testl	%eax, (%rbx)
	je	LBB0_10
## %bb.8:
	movl	$10, %edi
	movl	$20, %esi
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_xgene_enet_rd_mac
	testl	%eax, (%rbx)
	je	LBB0_10
## %bb.9:
	movl	$10, %edi
	movl	$20, %esi
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_xgene_enet_rd_mac
	testl	%eax, (%rbx)
	je	LBB0_10
## %bb.11:
	movl	$10, %edi
	movl	$20, %esi
	callq	_usleep_range
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netdev_err                     ## TAILCALL
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_MGMT_ADDRESS_ADDR,4,2      ## @MII_MGMT_ADDRESS_ADDR
	.comm	_MII_MGMT_CONTROL_ADDR,4,2      ## @MII_MGMT_CONTROL_ADDR
	.comm	_MII_MGMT_INDICATORS_ADDR,4,2   ## @MII_MGMT_INDICATORS_ADDR
	.comm	_BUSY_MASK,4,2                  ## @BUSY_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MII_MGMT write failed\n"

	.no_dead_strip	_xgene_mii_phy_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgene_mii_phy_write
_xgene_mii_phy_write:                   ; @xgene_mii_phy_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, x2
	mov	x19, x0
	mov	x0, x1
	bl	_PHY_ADDR
	mov	x22, x0
	mov	x0, x21
	bl	_REG_ADDR
	orr	w2, w0, w22
Lloh0:
	adrp	x8, _MII_MGMT_ADDRESS_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MII_MGMT_ADDRESS_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_xgene_enet_wr_mac
	mov	x0, x20
	bl	_PHY_CONTROL
	mov	x2, x0
Lloh3:
	adrp	x8, _MII_MGMT_CONTROL_ADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MII_MGMT_CONTROL_ADDR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_xgene_enet_wr_mac
Lloh6:
	adrp	x20, _MII_MGMT_INDICATORS_ADDR@GOTPAGE
Lloh7:
	ldr	x20, [x20, _MII_MGMT_INDICATORS_ADDR@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_xgene_enet_rd_mac
Lloh8:
	adrp	x21, _BUSY_MASK@GOTPAGE
Lloh9:
	ldr	x21, [x21, _BUSY_MASK@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.1:
	mov	w0, #10
	mov	w1, #20
	bl	_usleep_range
	ldr	w1, [x20]
	mov	x0, x19
	bl	_xgene_enet_rd_mac
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.2:
	mov	w0, #10
	mov	w1, #20
	bl	_usleep_range
	ldr	w1, [x20]
	mov	x0, x19
	bl	_xgene_enet_rd_mac
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.3:
	mov	w0, #10
	mov	w1, #20
	bl	_usleep_range
	ldr	w1, [x20]
	mov	x0, x19
	bl	_xgene_enet_rd_mac
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.4:
	mov	w0, #10
	mov	w1, #20
	bl	_usleep_range
	ldr	w1, [x20]
	mov	x0, x19
	bl	_xgene_enet_rd_mac
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.5:
	mov	w0, #10
	mov	w1, #20
	bl	_usleep_range
	ldr	w1, [x20]
	mov	x0, x19
	bl	_xgene_enet_rd_mac
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.6:
	mov	w0, #10
	mov	w1, #20
	bl	_usleep_range
	ldr	w1, [x20]
	mov	x0, x19
	bl	_xgene_enet_rd_mac
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.7:
	mov	w0, #10
	mov	w1, #20
	bl	_usleep_range
	ldr	w1, [x20]
	mov	x0, x19
	bl	_xgene_enet_rd_mac
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.8:
	mov	w0, #10
	mov	w1, #20
	bl	_usleep_range
	ldr	w1, [x20]
	mov	x0, x19
	bl	_xgene_enet_rd_mac
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.9:
	mov	w0, #10
	mov	w1, #20
	bl	_usleep_range
	ldr	w1, [x20]
	mov	x0, x19
	bl	_xgene_enet_rd_mac
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.10:
	mov	w0, #10
	mov	w1, #20
	bl	_usleep_range
	ldr	w0, [x19]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	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	_netdev_err
LBB0_11:
	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	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_MGMT_ADDRESS_ADDR,4,2      ; @MII_MGMT_ADDRESS_ADDR
	.comm	_MII_MGMT_CONTROL_ADDR,4,2      ; @MII_MGMT_CONTROL_ADDR
	.comm	_MII_MGMT_INDICATORS_ADDR,4,2   ; @MII_MGMT_INDICATORS_ADDR
	.comm	_BUSY_MASK,4,2                  ; @BUSY_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MII_MGMT write failed\n"

	.no_dead_strip	_xgene_mii_phy_write
.subsections_via_symbols
