	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_mac_register_phydev
_hns_mac_register_phydev:               ## @hns_mac_register_phydev
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	8(%rsi), %edi
	leaq	L_.str(%rip), %rsi
	leaq	-40(%rbp), %rdx
	callq	_fwnode_property_read_string
	testl	%eax, %eax
	js	LBB0_13
## %bb.1:
	movq	-40(%rbp), %rbx
	movq	_PHY_INTERFACE_MODE_XGMII@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_phy_modes
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_2
## %bb.6:
	movq	-40(%rbp), %rbx
	movq	_PHY_INTERFACE_MODE_SGMII@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_phy_modes
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movq	_ENODATA@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_2:
	movl	$1, %edx
	jmp	LBB0_3
LBB0_7:
	xorl	%edx, %edx
LBB0_3:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_get_phy_device
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
LBB0_5:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_9:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	8(%r15), %rax
	movl	(%rax,%r14,4), %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_phy_device_register
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	callq	_phy_device_free
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_12:
	movq	%rbx, (%r12)
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_dev_dbg
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phy-mode"

	.comm	_PHY_INTERFACE_MODE_XGMII,4,2   ## @PHY_INTERFACE_MODE_XGMII
	.comm	_PHY_INTERFACE_MODE_SGMII,4,2   ## @PHY_INTERFACE_MODE_SGMII
	.comm	_ENODATA,4,2                    ## @ENODATA
	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"registered phy fail at address %i\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"registered phy at address %i\n"

	.no_dead_strip	_hns_mac_register_phydev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_mac_register_phydev
_hns_mac_register_phydev:               ; @hns_mac_register_phydev
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w0, [x1, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #8
	bl	_fwnode_property_read_string
	tbnz	w0, #31, LBB0_10
; %bb.1:
	ldr	x22, [sp, #8]
Lloh2:
	adrp	x8, _PHY_INTERFACE_MODE_XGMII@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_XGMII@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_phy_modes
	mov	x1, x0
	mov	x0, x22
	bl	_strcmp
	cbz	w0, LBB0_4
; %bb.2:
	ldr	x22, [sp, #8]
Lloh5:
	adrp	x8, _PHY_INTERFACE_MODE_SGMII@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_SGMII@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_phy_modes
	mov	x1, x0
	mov	x0, x22
	bl	_strcmp
	cbz	w0, LBB0_5
; %bb.3:
Lloh8:
	adrp	x8, _ENODATA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
	b	LBB0_9
LBB0_4:
	mov	w2, #1
	b	LBB0_6
LBB0_5:
	mov	w2, #0
LBB0_6:
	mov	x0, x20
	mov	x1, x19
	bl	_get_phy_device
	cbz	x0, LBB0_8
; %bb.7:
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_11
LBB0_8:
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_11:
	ldr	x8, [x20, #8]
	ldr	w8, [x8, x19, lsl #2]
	str	w8, [x22]
	mov	x0, x22
	bl	_phy_device_register
	cbz	w0, LBB0_13
; %bb.12:
	mov	x0, x22
	bl	_phy_device_free
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_dev_err
Lloh14:
	adrp	x8, _ENODEV@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_9
LBB0_13:
	str	x22, [x21]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_dev_dbg
	mov	w0, #0
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phy-mode"

	.comm	_PHY_INTERFACE_MODE_XGMII,4,2   ; @PHY_INTERFACE_MODE_XGMII
	.comm	_PHY_INTERFACE_MODE_SGMII,4,2   ; @PHY_INTERFACE_MODE_SGMII
	.comm	_ENODATA,4,2                    ; @ENODATA
	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"registered phy fail at address %i\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"registered phy at address %i\n"

	.no_dead_strip	_hns_mac_register_phydev
.subsections_via_symbols
