	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_board_eth_init                 ## -- Begin function board_eth_init
	.p2align	4, 0x90
_board_eth_init:                        ## @board_eth_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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_RTL8366_DEVNAME@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rax, -40(%rbp)
	movq	_RTL8366_LANPHY_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_RTL8366_WANPHY_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	$1, -64(%rbp)
	leaq	-48(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	callq	_ag71xx_register
	movl	$-1, %ebx
	testq	%rax, %rax
	jle	LBB0_3
## %bb.1:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_rtl8366s_initialize
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_rtl8366_mii_register
	negq	%rax
	sbbl	%r15d, %r15d
	movl	%r15d, %ebx
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RTL8366_DEVNAME,8,3            ## @RTL8366_DEVNAME
	.comm	_RTL8366_LANPHY_ID,4,2          ## @RTL8366_LANPHY_ID
	.comm	_RTL8366_WANPHY_ID,4,2          ## @RTL8366_WANPHY_ID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_board_eth_init                 ; -- Begin function board_eth_init
	.p2align	2
_board_eth_init:                        ; @board_eth_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, _RTL8366_DEVNAME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RTL8366_DEVNAME@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	stp	x8, x8, [sp, #24]
Lloh6:
	adrp	x8, _RTL8366_LANPHY_ID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RTL8366_LANPHY_ID@GOTPAGEOFF]
Lloh8:
	adrp	x9, _RTL8366_WANPHY_ID@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RTL8366_WANPHY_ID@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #16]
	mov	w8, #1
	str	x8, [sp, #8]
	add	x1, sp, #24
	add	x2, sp, #16
	add	x3, sp, #8
	bl	_ag71xx_register
	cmp	x0, #1
	b.lt	LBB0_2
; %bb.1:
	bl	_rtl8366s_initialize
	cbz	x0, LBB0_3
LBB0_2:
	mov	w0, #-1
	b	LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_rtl8366_mii_register
	cmp	x0, #0
	csetm	w0, ne
LBB0_4:
	ldur	x8, [x29, #-24]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RTL8366_DEVNAME,8,3            ; @RTL8366_DEVNAME
	.comm	_RTL8366_LANPHY_ID,4,2          ; @RTL8366_LANPHY_ID
	.comm	_RTL8366_WANPHY_ID,4,2          ; @RTL8366_WANPHY_ID
.subsections_via_symbols
