	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hclge_mac_mdio_config          ## -- Begin function hclge_mac_mdio_config
	.p2align	4, 0x90
_hclge_mac_mdio_config:                 ## @hclge_mac_mdio_config
	.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, %r15
	movq	8(%rdi), %rdx
	cmpq	$255, %rdx
	jne	LBB0_3
## %bb.1:
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
LBB0_2:
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_3:
	movq	_PHY_MAX_ADDR@GOTPCREL(%rip), %rax
	movq	(%r15), %rdi
	cmpq	(%rax), %rdx
	jge	LBB0_7
## %bb.4:
	callq	_devm_mdiobus_alloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	%rax, %r14
	leaq	L_.str.2(%rip), %rax
	movq	%rax, (%r14)
	movq	_hclge_mdio_read@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r14)
	movq	_hclge_mdio_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r14)
	movl	32(%r14), %r12d
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	(%r15), %rdi
	callq	_dev_name
	leaq	L_.str.3(%rip), %rdx
	leaq	L_.str.4(%rip), %rcx
	movl	%r12d, %edi
	movl	%ebx, %esi
	movq	%rax, %r8
	callq	_snprintf
	movq	(%r15), %rax
	movq	%rax, 16(%r14)
	movq	%r15, 24(%r14)
	movb	8(%r15), %cl
	movl	$-2, %eax
	roll	%cl, %eax
	movl	%eax, 8(%r14)
	movq	%r14, %rdi
	callq	_mdiobus_register
	testl	%eax, %eax
	je	LBB0_9
## %bb.6:
	movl	%eax, %ebx
	movq	16(%r14), %rdi
	leaq	L_.str.5(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_13
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_9:
	movl	8(%r15), %esi
	movq	%r14, %rdi
	callq	_mdiobus_get_phy
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%rax, 24(%r15)
	movq	%r14, 16(%r15)
	jmp	LBB0_2
LBB0_11:
	movq	16(%r14), %rdi
	leaq	L_.str.6(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	movq	%r14, %rdi
	callq	_mdiobus_unregister
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_12:
	subl	(%rax), %ebx
LBB0_13:
	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	"no phy device is connected to mdio bus\n"

	.comm	_PHY_MAX_ADDR,8,3               ## @PHY_MAX_ADDR
L_.str.1:                               ## @.str.1
	.asciz	"phy_addr(%d) is too large.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"hisilicon MII bus"

	.comm	_hclge_mdio_read,4,2            ## @hclge_mdio_read
	.comm	_hclge_mdio_write,4,2           ## @hclge_mdio_write
	.comm	_MII_BUS_ID_SIZE,4,2            ## @MII_BUS_ID_SIZE
L_.str.3:                               ## @.str.3
	.asciz	"%s-%s"

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

L_.str.5:                               ## @.str.5
	.asciz	"Failed to register MDIO bus ret = %#x\n"

L_.str.6:                               ## @.str.6
	.asciz	"Failed to get phy device\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_PHY_INEXISTENT,8,3             ## @PHY_INEXISTENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hclge_mac_mdio_config          ; -- Begin function hclge_mac_mdio_config
	.p2align	2
_hclge_mac_mdio_config:                 ; @hclge_mac_mdio_config
	.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, x0
	ldr	x8, [x0, #8]
	cmp	x8, #255
	b.ne	LBB0_2
; %bb.1:
	ldr	x0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	mov	w21, #0
	b	LBB0_12
LBB0_2:
Lloh2:
	adrp	x9, _PHY_MAX_ADDR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PHY_MAX_ADDR@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	ldr	x0, [x19]
	cmp	x8, x9
	b.ge	LBB0_6
; %bb.3:
	bl	_devm_mdiobus_alloc
	cbz	x0, LBB0_7
; %bb.4:
	mov	x20, x0
Lloh5:
	adrp	x8, l_.str.2@PAGE
Lloh6:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh7:
	adrp	x9, _hclge_mdio_read@GOTPAGE
Lloh8:
	ldr	x9, [x9, _hclge_mdio_read@GOTPAGEOFF]
	str	x8, [x0]
Lloh9:
	ldr	w8, [x9]
Lloh10:
	adrp	x9, _hclge_mdio_write@GOTPAGE
Lloh11:
	ldr	x9, [x9, _hclge_mdio_write@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #36]
	ldr	w21, [x0, #32]
Lloh13:
	adrp	x8, _MII_BUS_ID_SIZE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MII_BUS_ID_SIZE@GOTPAGEOFF]
Lloh15:
	ldr	w22, [x8]
	ldr	x0, [x19]
	bl	_dev_name
	mov	x4, x0
Lloh16:
	adrp	x2, l_.str.3@PAGE
Lloh17:
	add	x2, x2, l_.str.3@PAGEOFF
Lloh18:
	adrp	x3, l_.str.4@PAGE
Lloh19:
	add	x3, x3, l_.str.4@PAGEOFF
	mov	x0, x21
	mov	x1, x22
	bl	_snprintf
	ldr	x8, [x19]
	stp	x8, x19, [x20, #16]
	ldr	w8, [x19, #8]
	mov	w9, #1
	lsl	w8, w9, w8
	mvn	w8, w8
	str	w8, [x20, #8]
	mov	x0, x20
	bl	_mdiobus_register
	cbz	w0, LBB0_8
; %bb.5:
	mov	x21, x0
	ldr	x0, [x20, #16]
	str	x21, [sp]
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
	b	LBB0_12
LBB0_6:
	str	x8, [sp]
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_7:
Lloh26:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_11
LBB0_8:
	ldr	w1, [x19, #8]
	mov	x0, x20
	bl	_mdiobus_get_phy
	cbz	x0, LBB0_10
; %bb.9:
	mov	w21, #0
	stp	x20, x0, [x19, #16]
	b	LBB0_12
LBB0_10:
	ldr	x0, [x20, #16]
Lloh28:
	adrp	x1, l_.str.6@PAGE
Lloh29:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_err
	mov	x0, x20
	bl	_mdiobus_unregister
Lloh30:
	adrp	x8, _EIO@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_12:
	mov	x0, x21
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no phy device is connected to mdio bus\n"

	.comm	_PHY_MAX_ADDR,8,3               ; @PHY_MAX_ADDR
l_.str.1:                               ; @.str.1
	.asciz	"phy_addr(%d) is too large.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"hisilicon MII bus"

	.comm	_hclge_mdio_read,4,2            ; @hclge_mdio_read
	.comm	_hclge_mdio_write,4,2           ; @hclge_mdio_write
	.comm	_MII_BUS_ID_SIZE,4,2            ; @MII_BUS_ID_SIZE
l_.str.3:                               ; @.str.3
	.asciz	"%s-%s"

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

l_.str.5:                               ; @.str.5
	.asciz	"Failed to register MDIO bus ret = %#x\n"

l_.str.6:                               ; @.str.6
	.asciz	"Failed to get phy device\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_PHY_INEXISTENT,8,3             ; @PHY_INEXISTENT
.subsections_via_symbols
