	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nixge_mdio_write
_nixge_mdio_write:                      ## @nixge_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, %ebx
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	(%rdi), %r13
	movq	_MII_ADDR_C45@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_4
## %bb.1:
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movl	%ebx, %r14d
	shrl	$16, %r14d
	andl	$31, %r14d
	movq	_NIXGE_REG_MDIO_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	%bx, %edx
	movq	%r13, %rdi
	callq	_nixge_ctrl_write_reg
	movq	_NIXGE_MDIO_CLAUSE45@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_NIXGE_MDIO_OP_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_NIXGE_MDIO_OP
	movl	%eax, %r12d
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edi
	callq	_NIXGE_MDIO_ADDR
	orl	%eax, %ebx
	orl	%r12d, %ebx
	movl	%r14d, %edi
	callq	_NIXGE_MDIO_MMD
	orl	%eax, %ebx
	movq	_NIXGE_REG_MDIO_OP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_nixge_ctrl_write_reg
	movq	_NIXGE_REG_MDIO_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_nixge_ctrl_write_reg
	movl	(%rbx), %esi
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	xorl	%ecx, %ecx
	movl	$10, %r8d
	movl	$1000, %r9d                     ## imm = 0x3E8
	callq	_nixge_ctrl_poll_timeout
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_7
LBB0_4:
	andl	$31, %ebx
	movq	_NIXGE_MDIO_CLAUSE22@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_NIXGE_MDIO_C22_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_NIXGE_MDIO_OP
	movl	%eax, %r12d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_NIXGE_MDIO_ADDR
	orl	%eax, %r14d
	orl	%r12d, %r14d
	movl	%ebx, %edi
	callq	_NIXGE_MDIO_MMD
	orl	%eax, %r14d
	movq	_NIXGE_REG_MDIO_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r15d, %edx
	callq	_nixge_ctrl_write_reg
	movq	_NIXGE_REG_MDIO_OP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_nixge_ctrl_write_reg
	movq	_NIXGE_REG_MDIO_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_nixge_ctrl_write_reg
	movl	(%rbx), %esi
	xorl	%r12d, %r12d
	jmp	LBB0_5
LBB0_3:
	movq	_NIXGE_MDIO_CLAUSE45@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_NIXGE_MDIO_C45_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_NIXGE_MDIO_OP
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%r15d, %edi
	callq	_NIXGE_MDIO_ADDR
	orl	%eax, %ebx
	orl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	movl	%r14d, %edi
	callq	_NIXGE_MDIO_MMD
	orl	%eax, %ebx
	movq	_NIXGE_REG_MDIO_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_nixge_ctrl_write_reg
	movq	_NIXGE_REG_MDIO_OP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_nixge_ctrl_write_reg
	movq	_NIXGE_REG_MDIO_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_5:
	movq	%r13, %rdi
	xorl	%ecx, %ecx
	movl	$10, %r8d
	movl	$1000, %r9d                     ## imm = 0x3E8
	callq	_nixge_ctrl_poll_timeout
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
LBB0_7:
	movl	%eax, %r12d
	movl	(%r13), %edi
	callq	_dev_err
LBB0_8:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_ADDR_C45,4,2               ## @MII_ADDR_C45
	.comm	_NIXGE_REG_MDIO_ADDR,4,2        ## @NIXGE_REG_MDIO_ADDR
	.comm	_NIXGE_MDIO_CLAUSE45,4,2        ## @NIXGE_MDIO_CLAUSE45
	.comm	_NIXGE_MDIO_OP_ADDRESS,4,2      ## @NIXGE_MDIO_OP_ADDRESS
	.comm	_NIXGE_REG_MDIO_OP,4,2          ## @NIXGE_REG_MDIO_OP
	.comm	_NIXGE_REG_MDIO_CTRL,4,2        ## @NIXGE_REG_MDIO_CTRL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout setting address"

	.comm	_NIXGE_MDIO_C45_WRITE,4,2       ## @NIXGE_MDIO_C45_WRITE
	.comm	_NIXGE_REG_MDIO_DATA,4,2        ## @NIXGE_REG_MDIO_DATA
L_.str.1:                               ## @.str.1
	.asciz	"timeout setting write command"

	.comm	_NIXGE_MDIO_CLAUSE22,4,2        ## @NIXGE_MDIO_CLAUSE22
	.comm	_NIXGE_MDIO_C22_WRITE,4,2       ## @NIXGE_MDIO_C22_WRITE
	.no_dead_strip	_nixge_mdio_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nixge_mdio_write
_nixge_mdio_write:                      ; @nixge_mdio_write
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x3
	mov	x21, x1
	ldr	x19, [x0]
Lloh0:
	adrp	x8, _MII_ADDR_C45@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MII_ADDR_C45@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_3
; %bb.1:
	ubfx	w22, w2, #16, #5
Lloh3:
	adrp	x8, _NIXGE_REG_MDIO_ADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NIXGE_REG_MDIO_ADDR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	and	w2, w2, #0xffff
	mov	x0, x19
	bl	_nixge_ctrl_write_reg
Lloh6:
	adrp	x26, _NIXGE_MDIO_CLAUSE45@GOTPAGE
Lloh7:
	ldr	x26, [x26, _NIXGE_MDIO_CLAUSE45@GOTPAGEOFF]
	ldr	w23, [x26]
Lloh8:
	adrp	x8, _NIXGE_MDIO_OP_ADDRESS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NIXGE_MDIO_OP_ADDRESS@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_NIXGE_MDIO_OP
	orr	w23, w0, w23
	mov	x0, x21
	bl	_NIXGE_MDIO_ADDR
	orr	w23, w23, w0
	mov	x0, x22
	bl	_NIXGE_MDIO_MMD
	orr	w2, w23, w0
Lloh11:
	adrp	x24, _NIXGE_REG_MDIO_OP@GOTPAGE
Lloh12:
	ldr	x24, [x24, _NIXGE_REG_MDIO_OP@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_nixge_ctrl_write_reg
Lloh13:
	adrp	x25, _NIXGE_REG_MDIO_CTRL@GOTPAGE
Lloh14:
	ldr	x25, [x25, _NIXGE_REG_MDIO_CTRL@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #1
	bl	_nixge_ctrl_write_reg
	ldr	w1, [x25]
	mov	x0, x19
	mov	w3, #0
	mov	w4, #10
	mov	w5, #1000
	bl	_nixge_ctrl_poll_timeout
	cbz	w0, LBB0_4
; %bb.2:
	mov	x23, x0
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_3:
	and	w22, w2, #0x1f
Lloh17:
	adrp	x8, _NIXGE_MDIO_CLAUSE22@GOTPAGE
Lloh18:
	ldr	x8, [x8, _NIXGE_MDIO_CLAUSE22@GOTPAGEOFF]
Lloh19:
	ldr	w23, [x8]
Lloh20:
	adrp	x8, _NIXGE_MDIO_C22_WRITE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NIXGE_MDIO_C22_WRITE@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_NIXGE_MDIO_OP
	orr	w23, w0, w23
	mov	x0, x21
	bl	_NIXGE_MDIO_ADDR
	orr	w21, w23, w0
	mov	x0, x22
	bl	_NIXGE_MDIO_MMD
	orr	w21, w21, w0
Lloh23:
	adrp	x8, _NIXGE_REG_MDIO_DATA@GOTPAGE
Lloh24:
	ldr	x8, [x8, _NIXGE_REG_MDIO_DATA@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_nixge_ctrl_write_reg
Lloh26:
	adrp	x8, _NIXGE_REG_MDIO_OP@GOTPAGE
Lloh27:
	ldr	x8, [x8, _NIXGE_REG_MDIO_OP@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_nixge_ctrl_write_reg
Lloh29:
	adrp	x20, _NIXGE_REG_MDIO_CTRL@GOTPAGE
Lloh30:
	ldr	x20, [x20, _NIXGE_REG_MDIO_CTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #1
	bl	_nixge_ctrl_write_reg
	ldr	w1, [x20]
	b	LBB0_5
LBB0_4:
	ldr	w23, [x26]
Lloh31:
	adrp	x8, _NIXGE_MDIO_C45_WRITE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _NIXGE_MDIO_C45_WRITE@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	bl	_NIXGE_MDIO_OP
	orr	w23, w0, w23
	mov	x0, x21
	bl	_NIXGE_MDIO_ADDR
	orr	w21, w23, w0
	mov	x0, x22
	bl	_NIXGE_MDIO_MMD
	orr	w21, w21, w0
Lloh34:
	adrp	x8, _NIXGE_REG_MDIO_DATA@GOTPAGE
Lloh35:
	ldr	x8, [x8, _NIXGE_REG_MDIO_DATA@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_nixge_ctrl_write_reg
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x21
	bl	_nixge_ctrl_write_reg
	ldr	w1, [x25]
LBB0_5:
	mov	x0, x19
	mov	w3, #0
	mov	w4, #10
	mov	w5, #1000
	bl	_nixge_ctrl_poll_timeout
	mov	x23, x0
	cbz	w0, LBB0_8
; %bb.6:
Lloh37:
	adrp	x1, l_.str.1@PAGE
Lloh38:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	ldr	w0, [x19]
	bl	_dev_err
LBB0_8:
	mov	x0, x23
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_ADDR_C45,4,2               ; @MII_ADDR_C45
	.comm	_NIXGE_REG_MDIO_ADDR,4,2        ; @NIXGE_REG_MDIO_ADDR
	.comm	_NIXGE_MDIO_CLAUSE45,4,2        ; @NIXGE_MDIO_CLAUSE45
	.comm	_NIXGE_MDIO_OP_ADDRESS,4,2      ; @NIXGE_MDIO_OP_ADDRESS
	.comm	_NIXGE_REG_MDIO_OP,4,2          ; @NIXGE_REG_MDIO_OP
	.comm	_NIXGE_REG_MDIO_CTRL,4,2        ; @NIXGE_REG_MDIO_CTRL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout setting address"

	.comm	_NIXGE_MDIO_C45_WRITE,4,2       ; @NIXGE_MDIO_C45_WRITE
	.comm	_NIXGE_REG_MDIO_DATA,4,2        ; @NIXGE_REG_MDIO_DATA
l_.str.1:                               ; @.str.1
	.asciz	"timeout setting write command"

	.comm	_NIXGE_MDIO_CLAUSE22,4,2        ; @NIXGE_MDIO_CLAUSE22
	.comm	_NIXGE_MDIO_C22_WRITE,4,2       ; @NIXGE_MDIO_C22_WRITE
	.no_dead_strip	_nixge_mdio_write
.subsections_via_symbols
