	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_axienet_mdio_enable            ## -- Begin function axienet_mdio_enable
	.p2align	4, 0x90
_axienet_mdio_enable:                   ## @axienet_mdio_enable
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_clk_get_rate
	movl	%eax, %ecx
	movl	%eax, -28(%rbp)
	jmp	LBB0_8
LBB0_2:
	leaq	L_.str(%rip), %rsi
	xorl	%edi, %edi
	callq	_of_find_node_by_name
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r14
	leaq	L_.str.2(%rip), %rsi
	leaq	-28(%rbp), %rdx
	movq	%rax, %rdi
	callq	_of_property_read_u32
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_netdev_warn
	movq	_DEFAULT_HOST_CLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
LBB0_6:
	movq	%r14, %rdi
	callq	_of_node_put
	movl	-28(%rbp), %edx
	jmp	LBB0_7
LBB0_3:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_netdev_warn
	movq	_DEFAULT_HOST_CLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, -28(%rbp)
LBB0_7:
	movl	(%r15), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_netdev_info
	movl	-28(%rbp), %ecx
LBB0_8:
	movq	_MAX_MDIO_FREQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%esi, %esi
	movl	%ecx, %eax
	cltd
	idivl	%esi
	movl	%eax, %ebx
	cmpl	$1, %edx
	sbbl	$0, %ebx
	movl	(%r15), %edi
	leaq	L_.str.5(%rip), %rsi
	movl	%ebx, %edx
	callq	_netdev_dbg
	movq	_XAE_MDIO_MC_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_XAE_MDIO_MC_MDIOEN_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_axienet_iow
	movq	%r15, %rdi
	callq	_axienet_mdio_wait_until_ready
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cpu"

L_.str.1:                               ## @.str.1
	.asciz	"Could not find CPU device node.\n"

	.comm	_DEFAULT_HOST_CLOCK,4,2         ## @DEFAULT_HOST_CLOCK
L_.str.2:                               ## @.str.2
	.asciz	"clock-frequency"

L_.str.3:                               ## @.str.3
	.asciz	"CPU clock-frequency property not found.\n"

L_.str.4:                               ## @.str.4
	.asciz	"Setting assumed host clock to %u\n"

	.comm	_MAX_MDIO_FREQ,4,2              ## @MAX_MDIO_FREQ
L_.str.5:                               ## @.str.5
	.asciz	"Setting MDIO clock divisor to %u/%u Hz host clock.\n"

	.comm	_XAE_MDIO_MC_OFFSET,4,2         ## @XAE_MDIO_MC_OFFSET
	.comm	_XAE_MDIO_MC_MDIOEN_MASK,4,2    ## @XAE_MDIO_MC_MDIOEN_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_axienet_mdio_enable            ; -- Begin function axienet_mdio_enable
	.p2align	2
_axienet_mdio_enable:                   ; @axienet_mdio_enable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	x0, [x0, #8]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_clk_get_rate
	mov	x3, x0
	str	w0, [sp, #12]
	b	LBB0_8
LBB0_2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_of_find_node_by_name
	cbz	x0, LBB0_6
; %bb.3:
	mov	x20, x0
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #12
	bl	_of_property_read_u32
	cbz	w0, LBB0_5
; %bb.4:
	ldr	w0, [x19]
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_netdev_warn
Lloh6:
	adrp	x8, _DEFAULT_HOST_CLOCK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DEFAULT_HOST_CLOCK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp, #12]
LBB0_5:
	mov	x0, x20
	bl	_of_node_put
	ldr	w2, [sp, #12]
	b	LBB0_7
LBB0_6:
	ldr	w0, [x19]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_warn
Lloh11:
	adrp	x8, _DEFAULT_HOST_CLOCK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DEFAULT_HOST_CLOCK@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	str	w2, [sp, #12]
LBB0_7:
	ldr	w0, [x19]
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_netdev_info
	ldr	w3, [sp, #12]
LBB0_8:
Lloh16:
	adrp	x8, _MAX_MDIO_FREQ@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MAX_MDIO_FREQ@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	lsl	w8, w8, #1
	sdiv	w9, w3, w8
	msub	w8, w9, w8, w3
	cmp	w8, #0
	cset	w8, eq
	sub	w20, w9, w8
	ldr	w0, [x19]
Lloh19:
	adrp	x1, l_.str.5@PAGE
Lloh20:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x2, x20
	bl	_netdev_dbg
Lloh21:
	adrp	x8, _XAE_MDIO_MC_OFFSET@GOTPAGE
Lloh22:
	ldr	x8, [x8, _XAE_MDIO_MC_OFFSET@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _XAE_MDIO_MC_MDIOEN_MASK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _XAE_MDIO_MC_MDIOEN_MASK@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	orr	w2, w8, w20
	mov	x0, x19
	bl	_axienet_iow
	mov	x0, x19
	bl	_axienet_mdio_wait_until_ready
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cpu"

l_.str.1:                               ; @.str.1
	.asciz	"Could not find CPU device node.\n"

	.comm	_DEFAULT_HOST_CLOCK,4,2         ; @DEFAULT_HOST_CLOCK
l_.str.2:                               ; @.str.2
	.asciz	"clock-frequency"

l_.str.3:                               ; @.str.3
	.asciz	"CPU clock-frequency property not found.\n"

l_.str.4:                               ; @.str.4
	.asciz	"Setting assumed host clock to %u\n"

	.comm	_MAX_MDIO_FREQ,4,2              ; @MAX_MDIO_FREQ
l_.str.5:                               ; @.str.5
	.asciz	"Setting MDIO clock divisor to %u/%u Hz host clock.\n"

	.comm	_XAE_MDIO_MC_OFFSET,4,2         ; @XAE_MDIO_MC_OFFSET
	.comm	_XAE_MDIO_MC_MDIOEN_MASK,4,2    ; @XAE_MDIO_MC_MDIOEN_MASK
.subsections_via_symbols
