	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_mdio_init
_mtk_mdio_init:                         ## @mtk_mdio_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_of_get_child_by_name
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_of_device_is_available
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:
	movq	8(%rbx), %rdi
	callq	_devm_mdiobus_alloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	leaq	L_.str.2(%rip), %rcx
	movq	%rcx, (%rax)
	movq	_mtk_mdio_read@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 36(%rax)
	movq	_mtk_mdio_write@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 32(%rax)
	movq	%rbx, 24(%rax)
	movq	8(%rbx), %rcx
	movq	%rcx, 16(%rax)
	movl	8(%rax), %edi
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r14, %rcx
	callq	_snprintf
	movq	(%rbx), %rdi
	movq	%r14, %rsi
	callq	_of_mdiobus_register
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_1:
	movq	8(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str(%rip), %rdx
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movq	%r14, %rdi
	callq	_of_node_put
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mdio-bus"

L_.str.1:                               ## @.str.1
	.asciz	"no %s child node found"

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

	.comm	_mtk_mdio_read,4,2              ## @mtk_mdio_read
	.comm	_mtk_mdio_write,4,2             ## @mtk_mdio_write
	.comm	_MII_BUS_ID_SIZE,4,2            ## @MII_BUS_ID_SIZE
L_.str.3:                               ## @.str.3
	.asciz	"%pOFn"

	.no_dead_strip	_mtk_mdio_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_mdio_init
_mtk_mdio_init:                         ; @mtk_mdio_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	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_child_by_name
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	bl	_of_device_is_available
	cbz	w0, LBB0_5
; %bb.2:
	ldr	x0, [x20, #8]
	bl	_devm_mdiobus_alloc
	str	x0, [x20]
	cbz	x0, LBB0_6
; %bb.3:
Lloh2:
	adrp	x8, l_.str.2@PAGE
Lloh3:
	add	x8, x8, l_.str.2@PAGEOFF
	str	x8, [x0]
Lloh4:
	adrp	x8, _mtk_mdio_read@GOTPAGE
Lloh5:
	ldr	x8, [x8, _mtk_mdio_read@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _mtk_mdio_write@GOTPAGE
Lloh8:
	ldr	x9, [x9, _mtk_mdio_write@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #32]
	ldr	x8, [x20, #8]
	stp	x8, x20, [x0, #16]
	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]
Lloh13:
	adrp	x2, l_.str.3@PAGE
Lloh14:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x3, x19
	bl	_snprintf
	ldr	x0, [x20]
	mov	x1, x19
	bl	_of_mdiobus_register
	mov	x20, x0
	b	LBB0_8
LBB0_4:
	ldr	x0, [x20, #8]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	bl	_dev_err
Lloh19:
	adrp	x8, _ENODEV@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_5:
Lloh22:
	adrp	x8, _ENODEV@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_8:
	mov	x0, x19
	bl	_of_node_put
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	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 AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mdio-bus"

l_.str.1:                               ; @.str.1
	.asciz	"no %s child node found"

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

	.comm	_mtk_mdio_read,4,2              ; @mtk_mdio_read
	.comm	_mtk_mdio_write,4,2             ; @mtk_mdio_write
	.comm	_MII_BUS_ID_SIZE,4,2            ; @MII_BUS_ID_SIZE
l_.str.3:                               ; @.str.3
	.asciz	"%pOFn"

	.no_dead_strip	_mtk_mdio_init
.subsections_via_symbols
