	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xge_mdio_write
_xge_mdio_write:                        ## @xge_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movl	%esi, %edx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r14
	movl	$0, -44(%rbp)
	movq	_PHY_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %r13
	movq	%r13, %rdi
	callq	_SET_REG_BITS
	movq	_REG_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_SET_REG_BITS
	movq	_MII_MGMT_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edx
	movq	%r14, %rdi
	callq	_xge_wr_csr
	movq	_MII_MGMT_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_xge_wr_csr
	movl	$-10, %ebx
	movq	_MII_MGMT_INDICATORS@GOTPCREL(%rip), %r15
	movq	_MII_MGMT_BUSY@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	$5, %edi
	movl	$10, %esi
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_xge_rd_csr
	andl	(%r12), %eax
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%rbx), %ecx
	testl	%ebx, %ebx
	movl	%ecx, %ebx
	jne	LBB0_1
LBB0_3:
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_4:
	xorl	%eax, %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_ADDR,4,2                   ## @PHY_ADDR
	.comm	_REG_ADDR,4,2                   ## @REG_ADDR
	.comm	_MII_MGMT_ADDRESS,4,2           ## @MII_MGMT_ADDRESS
	.comm	_MII_MGMT_CONTROL,4,2           ## @MII_MGMT_CONTROL
	.comm	_MII_MGMT_INDICATORS,4,2        ## @MII_MGMT_INDICATORS
	.comm	_MII_MGMT_BUSY,4,2              ## @MII_MGMT_BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MII_MGMT write failed\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_xge_mdio_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xge_mdio_write
_xge_mdio_write:                        ; @xge_mdio_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x3
	mov	x22, x2
	mov	x2, x1
	mov	x19, x0
	ldr	x20, [x0, #8]
	str	wzr, [sp, #12]
Lloh0:
	adrp	x8, _PHY_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHY_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x0, sp, #12
	bl	_SET_REG_BITS
Lloh3:
	adrp	x8, _REG_ADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_ADDR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x22
	bl	_SET_REG_BITS
Lloh6:
	adrp	x8, _MII_MGMT_ADDRESS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MII_MGMT_ADDRESS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w2, [sp, #12]
	mov	x0, x20
	bl	_xge_wr_csr
Lloh9:
	adrp	x8, _MII_MGMT_CONTROL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MII_MGMT_CONTROL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_xge_wr_csr
	mov	w21, #-10
Lloh12:
	adrp	x22, _MII_MGMT_INDICATORS@GOTPAGE
Lloh13:
	ldr	x22, [x22, _MII_MGMT_INDICATORS@GOTPAGEOFF]
Lloh14:
	adrp	x23, _MII_MGMT_BUSY@GOTPAGE
Lloh15:
	ldr	x23, [x23, _MII_MGMT_BUSY@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #5
	mov	w1, #10
	bl	_usleep_range
	ldr	w1, [x22]
	mov	x0, x20
	bl	_xge_rd_csr
	ldr	w8, [x23]
	and	w8, w8, w0
	cmp	w8, #0
	ccmp	w21, #0, #4, ne
	add	w21, w21, #1
	b.ne	LBB0_1
; %bb.2:
	cbz	w8, LBB0_4
; %bb.3:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh18:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_ADDR,4,2                   ; @PHY_ADDR
	.comm	_REG_ADDR,4,2                   ; @REG_ADDR
	.comm	_MII_MGMT_ADDRESS,4,2           ; @MII_MGMT_ADDRESS
	.comm	_MII_MGMT_CONTROL,4,2           ; @MII_MGMT_CONTROL
	.comm	_MII_MGMT_INDICATORS,4,2        ; @MII_MGMT_INDICATORS
	.comm	_MII_MGMT_BUSY,4,2              ; @MII_MGMT_BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MII_MGMT write failed\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_xge_mdio_write
.subsections_via_symbols
