	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function enetc_of_get_phy
_enetc_of_get_phy:                      ## @enetc_of_get_phy
	.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
	movl	24(%rdi), %edi
	callq	_enetc_si_priv
	movq	8(%r12), %rdi
	movq	(%rdi), %r15
	testq	%r15, %r15
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_of_parse_phandle
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_4
LBB0_9:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_get_child_by_name
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	%rax, %rdi
	callq	_of_node_put
	movq	%r14, %rdi
	callq	_enetc_mdio_probe
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %ebx
	movq	(%r12), %rdi
	callq	_of_node_put
	jmp	LBB0_18
LBB0_1:
	leaq	L_.str(%rip), %rsi
LBB0_2:
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_12:
	movq	%r15, %rdi
	callq	_of_get_phy_mode
	movq	%rax, 16(%r12)
	xorl	%ebx, %ebx
	testl	$-2147483648, %eax              ## imm = 0x80000000
	je	LBB0_18
## %bb.13:
	movq	8(%r12), %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_dev_err
	movq	(%r12), %rdi
	callq	_of_node_put
	movq	%r15, %rdi
	callq	_of_phy_is_fixed_link
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	%r15, %rdi
	callq	_of_phy_deregister_fixed_link
	jmp	LBB0_16
LBB0_4:
	movq	%r15, %rdi
	callq	_of_phy_is_fixed_link
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%r15, %rdi
	callq	_of_phy_register_fixed_link
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movq	%r15, %rdi
	callq	_of_node_get
	movq	%rax, (%r12)
	jmp	LBB0_9
LBB0_5:
	movq	8(%r12), %rdi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_15:
	movq	%r14, %rdi
	callq	_enetc_mdio_remove
LBB0_16:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_17:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_18:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%eax, %ebx
	movq	8(%r12), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"missing ENETC port node\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"phy-handle"

L_.str.2:                               ## @.str.2
	.asciz	"PHY not specified\n"

L_.str.3:                               ## @.str.3
	.asciz	"fixed link registration failed\n"

L_.str.4:                               ## @.str.4
	.asciz	"mdio"

L_.str.5:                               ## @.str.5
	.asciz	"missing phy type\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_enetc_of_get_phy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function enetc_of_get_phy
_enetc_of_get_phy:                      ; @enetc_of_get_phy
	.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	x21, x0
	ldr	w0, [x0, #24]
	bl	_enetc_si_priv
	mov	x19, x0
	ldr	x0, [x21, #8]
	ldr	x20, [x0]
	cbz	x20, LBB0_5
; %bb.1:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	w2, #0
	bl	_of_parse_phandle
	str	x0, [x21]
	cbz	x0, LBB0_9
LBB0_2:
Lloh2:
	adrp	x1, l_.str.4@PAGE
Lloh3:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_of_get_child_by_name
	cbz	x0, LBB0_7
; %bb.3:
	bl	_of_node_put
	mov	x0, x19
	bl	_enetc_mdio_probe
	cbz	w0, LBB0_7
; %bb.4:
	mov	x22, x0
	ldr	x0, [x21]
	bl	_of_node_put
	b	LBB0_19
LBB0_5:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
LBB0_6:
	bl	_dev_err
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_18
LBB0_7:
	mov	x0, x20
	bl	_of_get_phy_mode
	str	x0, [x21, #16]
	tbnz	w0, #31, LBB0_12
; %bb.8:
	mov	w22, #0
	b	LBB0_19
LBB0_9:
	mov	x0, x20
	bl	_of_phy_is_fixed_link
	cbz	x0, LBB0_14
; %bb.10:
	mov	x0, x20
	bl	_of_phy_register_fixed_link
	tbnz	w0, #31, LBB0_15
; %bb.11:
	mov	x0, x20
	bl	_of_node_get
	str	x0, [x21]
	b	LBB0_2
LBB0_12:
	ldr	x0, [x21, #8]
Lloh8:
	adrp	x1, l_.str.5@PAGE
Lloh9:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
	ldr	x0, [x21]
	bl	_of_node_put
	mov	x0, x20
	bl	_of_phy_is_fixed_link
	cbz	x0, LBB0_16
; %bb.13:
	mov	x0, x20
	bl	_of_phy_deregister_fixed_link
	b	LBB0_17
LBB0_14:
	ldr	x0, [x21, #8]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_15:
	mov	x22, x0
	ldr	x0, [x21, #8]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	b	LBB0_19
LBB0_16:
	mov	x0, x19
	bl	_enetc_mdio_remove
LBB0_17:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_19:
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"missing ENETC port node\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"phy-handle"

l_.str.2:                               ; @.str.2
	.asciz	"PHY not specified\n"

l_.str.3:                               ; @.str.3
	.asciz	"fixed link registration failed\n"

l_.str.4:                               ; @.str.4
	.asciz	"mdio"

l_.str.5:                               ; @.str.5
	.asciz	"missing phy type\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_enetc_of_get_phy
.subsections_via_symbols
