	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcmgenet_mii_of_init
_bcmgenet_mii_of_init:                  ## @bcmgenet_mii_of_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	16(%rdi), %r15
	movq	(%r15), %r14
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_of_parse_phandle
	movl	%eax, 8(%r12)
	testl	%eax, %eax
	je	LBB0_1
LBB0_4:
	movq	%r14, %rdi
	callq	_of_get_phy_mode
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movl	%ebx, (%r12)
	movq	_PHY_INTERFACE_MODE_INTERNAL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_8
## %bb.7:
	movl	$1, 4(%r12)
LBB0_8:
	movq	_PHY_INTERFACE_MODE_MOCA@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_11
## %bb.9:
	movq	%r14, %rdi
	callq	_of_phy_find_device
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	$0, 8(%rax)
	movq	%rax, %rdi
	callq	_put_device
LBB0_11:
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_1:
	movq	%r14, %rdi
	callq	_of_phy_is_fixed_link
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%r14, %rdi
	callq	_of_phy_register_fixed_link
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.3:
	movq	%r14, %rdi
	callq	_of_node_get
	movl	%eax, 8(%r12)
	jmp	LBB0_4
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phy-handle"

L_.str.1:                               ## @.str.1
	.asciz	"invalid PHY mode property\n"

	.comm	_PHY_INTERFACE_MODE_INTERNAL,4,2 ## @PHY_INTERFACE_MODE_INTERNAL
	.comm	_PHY_INTERFACE_MODE_MOCA,4,2    ## @PHY_INTERFACE_MODE_MOCA
	.no_dead_strip	_bcmgenet_mii_of_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcmgenet_mii_of_init
_bcmgenet_mii_of_init:                  ; @bcmgenet_mii_of_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	x20, x0
	ldr	x21, [x0, #16]
	ldr	x19, [x21]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	w2, #0
	bl	_of_parse_phandle
	str	w0, [x20, #8]
	cbz	w0, LBB0_8
LBB0_1:
	mov	x0, x19
	bl	_of_get_phy_mode
	mov	x22, x0
	tbnz	w0, #31, LBB0_11
; %bb.2:
	str	w22, [x20]
Lloh2:
	adrp	x8, _PHY_INTERFACE_MODE_INTERNAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_INTERNAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ne	LBB0_4
; %bb.3:
	mov	w8, #1
	str	w8, [x20, #4]
LBB0_4:
Lloh5:
	adrp	x8, _PHY_INTERFACE_MODE_MOCA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_MOCA@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ne	LBB0_7
; %bb.5:
	mov	x0, x19
	bl	_of_phy_find_device
	cbz	x0, LBB0_7
; %bb.6:
	str	xzr, [x0, #8]
	bl	_put_device
LBB0_7:
	mov	w22, #0
	b	LBB0_12
LBB0_8:
	mov	x0, x19
	bl	_of_phy_is_fixed_link
	cbz	x0, LBB0_1
; %bb.9:
	mov	x0, x19
	bl	_of_phy_register_fixed_link
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.10:
	mov	x0, x19
	bl	_of_node_get
	str	w0, [x20, #8]
	b	LBB0_1
LBB0_11:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_err
LBB0_12:
	mov	x0, x22
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phy-handle"

l_.str.1:                               ; @.str.1
	.asciz	"invalid PHY mode property\n"

	.comm	_PHY_INTERFACE_MODE_INTERNAL,4,2 ; @PHY_INTERFACE_MODE_INTERNAL
	.comm	_PHY_INTERFACE_MODE_MOCA,4,2    ; @PHY_INTERFACE_MODE_MOCA
	.no_dead_strip	_bcmgenet_mii_of_init
.subsections_via_symbols
