	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function greth_mdio_init
_greth_mdio_init:                       ## @greth_mdio_init
	.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
	movq	%rdi, %rbx
	movq	16(%rdi), %r12
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_mdiobus_alloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	L_.str(%rip), %rcx
	movq	%rcx, (%rax)
	movl	24(%rax), %edi
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %r8d
	leaq	L_.str.1(%rip), %rdx
	callq	_snprintf
	movq	_greth_mdio_read@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%rbx), %rdi
	movl	%eax, 20(%rdi)
	movq	_greth_mdio_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rdi)
	movq	%rbx, 8(%rdi)
	callq	_mdiobus_register
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	16(%rbx), %rdi
	callq	_greth_mdio_probe
	testl	%eax, %eax
	je	LBB0_8
## %bb.4:
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_netif_msg_probe
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	16(%rbx), %rdi
	addq	$4, %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
LBB0_6:
	movq	8(%rbx), %rdi
	callq	_mdiobus_unregister
LBB0_7:
	movq	8(%rbx), %rdi
	callq	_mdiobus_free
	jmp	LBB0_14
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	(%r12), %edi
	callq	_phy_start
	xorl	%r14d, %r14d
	cmpq	$0, 24(%rbx)
	je	LBB0_14
## %bb.9:
	movq	_greth_edcl@GOTPCREL(%rip), %rax
	cmpl	$1, (%rax)
	jne	LBB0_14
## %bb.10:
	movl	(%r12), %edi
	callq	_phy_start_aneg
	movq	_jiffies@GOTPCREL(%rip), %r13
	movslq	(%r13), %rax
	movq	_HZ@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	leaq	(%rax,%rcx,2), %r15
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	callq	_phy_aneg_done
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	(%r13), %edi
	movq	%r15, %rsi
	callq	_time_before
	testq	%rax, %rax
	jne	LBB0_11
LBB0_13:
	movl	(%r12), %edi
	callq	_phy_read_status
	movq	16(%rbx), %rdi
	callq	_greth_link_change
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"greth-mdio"

	.comm	_MII_BUS_ID_SIZE,4,2            ## @MII_BUS_ID_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"%s-%d"

	.comm	_greth_mdio_read,4,2            ## @greth_mdio_read
	.comm	_greth_mdio_write,4,2           ## @greth_mdio_write
L_.str.2:                               ## @.str.2
	.asciz	"failed to probe MDIO bus\n"

	.comm	_greth_edcl,4,2                 ## @greth_edcl
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_HZ,4,2                         ## @HZ
	.no_dead_strip	_greth_mdio_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function greth_mdio_init
_greth_mdio_init:                       ; @greth_mdio_init
	.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	x19, x0
	ldr	x21, [x0, #16]
	bl	_mdiobus_alloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_7
; %bb.1:
Lloh0:
	adrp	x3, l_.str@PAGE
Lloh1:
	add	x3, x3, l_.str@PAGEOFF
	str	x3, [x0]
	ldr	w0, [x0, #24]
Lloh2:
	adrp	x8, _MII_BUS_ID_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MII_BUS_ID_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	w4, [x19]
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_snprintf
Lloh7:
	adrp	x8, _greth_mdio_read@GOTPAGE
Lloh8:
	ldr	x8, [x8, _greth_mdio_read@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	x0, [x19, #8]
Lloh10:
	adrp	x9, _greth_mdio_write@GOTPAGE
Lloh11:
	ldr	x9, [x9, _greth_mdio_write@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #16]
	str	x19, [x0, #8]
	bl	_mdiobus_register
	mov	x20, x0
	cbnz	w0, LBB0_6
; %bb.2:
	ldr	x0, [x19, #16]
	bl	_greth_mdio_probe
	mov	x20, x0
	cbz	w0, LBB0_9
; %bb.3:
	mov	x0, x19
	bl	_netif_msg_probe
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x8, [x19, #16]
	add	x0, x8, #4
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
LBB0_5:
	ldr	x0, [x19, #8]
	bl	_mdiobus_unregister
LBB0_6:
	ldr	x0, [x19, #8]
	bl	_mdiobus_free
	b	LBB0_8
LBB0_7:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_8:
	mov	x0, x20
	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
LBB0_9:
	ldr	w0, [x21]
	bl	_phy_start
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_8
; %bb.10:
Lloh18:
	adrp	x8, _greth_edcl@GOTPAGE
Lloh19:
	ldr	x8, [x8, _greth_edcl@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_8
; %bb.11:
	ldr	w0, [x21]
	bl	_phy_start_aneg
Lloh21:
	adrp	x22, _jiffies@GOTPAGE
Lloh22:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
	ldrsw	x8, [x22]
Lloh23:
	adrp	x9, _HZ@GOTPAGE
Lloh24:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh25:
	ldrsw	x9, [x9]
	mov	w10, #6
	madd	x20, x9, x10, x8
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	bl	_phy_aneg_done
	cbnz	w0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x22]
	mov	x1, x20
	bl	_time_before
	cbnz	x0, LBB0_12
LBB0_14:
	ldr	w0, [x21]
	bl	_phy_read_status
	ldr	x0, [x19, #16]
	bl	_greth_link_change
	mov	w20, #0
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"greth-mdio"

	.comm	_MII_BUS_ID_SIZE,4,2            ; @MII_BUS_ID_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"%s-%d"

	.comm	_greth_mdio_read,4,2            ; @greth_mdio_read
	.comm	_greth_mdio_write,4,2           ; @greth_mdio_write
l_.str.2:                               ; @.str.2
	.asciz	"failed to probe MDIO bus\n"

	.comm	_greth_edcl,4,2                 ; @greth_edcl
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_HZ,4,2                         ; @HZ
	.no_dead_strip	_greth_mdio_init
.subsections_via_symbols
