	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_realtek_smi_setup_mdio         ## -- Begin function realtek_smi_setup_mdio
	.p2align	4, 0x90
_realtek_smi_setup_mdio:                ## @realtek_smi_setup_mdio
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_of_get_compatible_child
	movq	8(%rbx), %rdi
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	callq	_devm_mdiobus_alloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rbx, 40(%rax)
	leaq	L_.str.2(%rip), %rcx
	movq	%rcx, (%rax)
	movq	_realtek_smi_mdio_read@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 36(%rax)
	movq	_realtek_smi_mdio_write@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 32(%rax)
	movl	8(%rax), %edi
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%rbx), %rax
	movl	(%rax), %ecx
	leaq	L_.str.3(%rip), %rdx
	callq	_snprintf
	movq	(%rbx), %rdi
	movq	%r14, 24(%rdi)
	movq	8(%rbx), %rax
	movq	%rax, 16(%rdi)
	movq	16(%rbx), %rax
	movq	%rdi, 8(%rax)
	movq	%r14, %rsi
	callq	_of_mdiobus_register
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %r15d
	movq	(%rbx), %rax
	movq	8(%rbx), %rdi
	movl	8(%rax), %edx
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_8
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_7:
	movq	%r14, %rdi
	callq	_of_node_put
	jmp	LBB0_8
LBB0_5:
	xorl	%r15d, %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"realtek,smi-mdio"

L_.str.1:                               ## @.str.1
	.asciz	"no MDIO bus node\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"SMI slave MII"

	.comm	_realtek_smi_mdio_read,4,2      ## @realtek_smi_mdio_read
	.comm	_realtek_smi_mdio_write,4,2     ## @realtek_smi_mdio_write
	.comm	_MII_BUS_ID_SIZE,4,2            ## @MII_BUS_ID_SIZE
L_.str.3:                               ## @.str.3
	.asciz	"SMI-%d"

L_.str.4:                               ## @.str.4
	.asciz	"unable to register MDIO bus %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_realtek_smi_setup_mdio         ; -- Begin function realtek_smi_setup_mdio
	.p2align	2
_realtek_smi_setup_mdio:                ; @realtek_smi_setup_mdio
	.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	x20, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_of_get_compatible_child
	mov	x19, x0
	ldr	x0, [x20, #8]
	cbz	x19, LBB0_4
; %bb.1:
	bl	_devm_mdiobus_alloc
	str	x0, [x20]
	cbz	x0, LBB0_5
; %bb.2:
	str	x20, [x0, #40]
Lloh2:
	adrp	x8, l_.str.2@PAGE
Lloh3:
	add	x8, x8, l_.str.2@PAGEOFF
	str	x8, [x0]
Lloh4:
	adrp	x8, _realtek_smi_mdio_read@GOTPAGE
Lloh5:
	ldr	x8, [x8, _realtek_smi_mdio_read@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _realtek_smi_mdio_write@GOTPAGE
Lloh8:
	ldr	x9, [x9, _realtek_smi_mdio_write@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #32]
	ldr	w0, [x0, #8]
Lloh10:
	adrp	x8, _MII_BUS_ID_SIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MII_BUS_ID_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	x8, [x20, #16]
	ldr	w3, [x8]
Lloh13:
	adrp	x2, l_.str.3@PAGE
Lloh14:
	add	x2, x2, l_.str.3@PAGEOFF
	bl	_snprintf
	ldp	x0, x8, [x20]
	stp	x8, x19, [x0, #16]
	ldr	x8, [x20, #16]
	str	x0, [x8, #8]
	mov	x1, x19
	bl	_of_mdiobus_register
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.3:
	ldp	x8, x0, [x20]
	ldr	w8, [x8, #8]
	str	x8, [sp]
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
	b	LBB0_6
LBB0_4:
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh19:
	adrp	x8, _ENODEV@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_5:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_6:
	mov	x0, x19
	bl	_of_node_put
LBB0_7:
	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 AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"realtek,smi-mdio"

l_.str.1:                               ; @.str.1
	.asciz	"no MDIO bus node\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"SMI slave MII"

	.comm	_realtek_smi_mdio_read,4,2      ; @realtek_smi_mdio_read
	.comm	_realtek_smi_mdio_write,4,2     ; @realtek_smi_mdio_write
	.comm	_MII_BUS_ID_SIZE,4,2            ; @MII_BUS_ID_SIZE
l_.str.3:                               ; @.str.3
	.asciz	"SMI-%d"

l_.str.4:                               ; @.str.4
	.asciz	"unable to register MDIO bus %s\n"

.subsections_via_symbols
