	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_enetc_mdio_write               ## -- Begin function enetc_mdio_write
	.p2align	4, 0x90
_enetc_mdio_write:                      ## @enetc_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, %ebx
	movl	%edx, %r13d
	movl	%esi, %r12d
	movq	(%rdi), %rax
	movq	(%rax), %r15
	movq	_ENETC_MDC_DIV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MDIO_CFG_CLKDIV
	movq	_MDIO_CFG_NEG@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_MII_ADDR_C45@GOTPCREL(%rip), %r14
	testl	%r13d, (%r14)
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	je	LBB0_2
## %bb.1:
	movl	%r13d, %ebx
	sarl	$16, %ebx
	movq	_MDIO_CFG_ENC45@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	jmp	LBB0_3
LBB0_2:
	movq	_MDIO_CFG_ENC45@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	%r13d, %ebx
LBB0_3:
	movq	_MDIO_CFG@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_enetc_mdio_wr
	movq	%r15, %rdi
	callq	_enetc_mdio_wait_complete
	testl	%eax, %eax
	je	LBB0_4
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	andl	$31, %ebx
	movl	%r12d, %edi
	callq	_MDIO_CTL_PORT_ADDR
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_MDIO_CTL_DEV_ADDR
	orl	%eax, %r12d
	movq	_MDIO_CTL@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_enetc_mdio_wr
	testl	%r13d, (%r14)
	je	LBB0_7
## %bb.5:
	movzwl	%r13w, %edx
	movq	_MDIO_ADDR@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_enetc_mdio_wr
	movq	%r15, %rdi
	callq	_enetc_mdio_wait_complete
	testl	%eax, %eax
	jne	LBB0_6
LBB0_7:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_MDIO_DATA
	movq	_MDIO_DATA@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_enetc_mdio_wr
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_enetc_mdio_wait_complete       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENETC_MDC_DIV,4,2              ## @ENETC_MDC_DIV
	.comm	_MDIO_CFG_NEG,4,2               ## @MDIO_CFG_NEG
	.comm	_MII_ADDR_C45,4,2               ## @MII_ADDR_C45
	.comm	_MDIO_CFG_ENC45,4,2             ## @MDIO_CFG_ENC45
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_enetc_mdio_write               ; -- Begin function enetc_mdio_write
	.p2align	2
_enetc_mdio_write:                      ; @enetc_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	x8, [x0]
	ldr	x19, [x8]
Lloh0:
	adrp	x8, _ENETC_MDC_DIV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENETC_MDC_DIV@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_MDIO_CFG_CLKDIV
Lloh3:
	adrp	x8, _MDIO_CFG_NEG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MDIO_CFG_NEG@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh6:
	adrp	x24, _MII_ADDR_C45@GOTPAGE
Lloh7:
	ldr	x24, [x24, _MII_ADDR_C45@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w21
	b.eq	LBB0_2
; %bb.1:
	asr	w23, w21, #16
Lloh8:
	adrp	x9, _MDIO_CFG_ENC45@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MDIO_CFG_ENC45@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w2, w9, w8
	b	LBB0_3
LBB0_2:
Lloh11:
	adrp	x9, _MDIO_CFG_ENC45@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MDIO_CFG_ENC45@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	bic	w2, w8, w9
	mov	x23, x21
LBB0_3:
Lloh14:
	adrp	x1, _MDIO_CFG@GOTPAGE
Lloh15:
	ldr	x1, [x1, _MDIO_CFG@GOTPAGEOFF]
	mov	x0, x19
	bl	_enetc_mdio_wr
	mov	x0, x19
	bl	_enetc_mdio_wait_complete
	cbz	w0, LBB0_5
LBB0_4:
	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_5:
	and	w23, w23, #0x1f
	mov	x0, x22
	bl	_MDIO_CTL_PORT_ADDR
	mov	x22, x0
	mov	x0, x23
	bl	_MDIO_CTL_DEV_ADDR
	orr	w2, w0, w22
Lloh16:
	adrp	x1, _MDIO_CTL@GOTPAGE
Lloh17:
	ldr	x1, [x1, _MDIO_CTL@GOTPAGEOFF]
	mov	x0, x19
	bl	_enetc_mdio_wr
	ldr	w8, [x24]
	tst	w8, w21
	b.eq	LBB0_7
; %bb.6:
	and	w2, w21, #0xffff
Lloh18:
	adrp	x1, _MDIO_ADDR@GOTPAGE
Lloh19:
	ldr	x1, [x1, _MDIO_ADDR@GOTPAGEOFF]
	mov	x0, x19
	bl	_enetc_mdio_wr
	mov	x0, x19
	bl	_enetc_mdio_wait_complete
	cbnz	w0, LBB0_4
LBB0_7:
	mov	x0, x20
	bl	_MDIO_DATA
	mov	x2, x0
Lloh20:
	adrp	x1, _MDIO_DATA@GOTPAGE
Lloh21:
	ldr	x1, [x1, _MDIO_DATA@GOTPAGEOFF]
	mov	x0, x19
	bl	_enetc_mdio_wr
	mov	x0, x19
	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	_enetc_mdio_wait_complete
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ENETC_MDC_DIV,4,2              ; @ENETC_MDC_DIV
	.comm	_MDIO_CFG_NEG,4,2               ; @MDIO_CFG_NEG
	.comm	_MII_ADDR_C45,4,2               ; @MII_ADDR_C45
	.comm	_MDIO_CFG_ENC45,4,2             ; @MDIO_CFG_ENC45
.subsections_via_symbols
