	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar8xxx_mdiodev_probe
_ar8xxx_mdiodev_probe:                  ## @ar8xxx_mdiodev_probe
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_ar8xxx_mdiodev_of_match@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_of_match_device
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movq	%rax, %rbx
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_ar8xxx_create
	testq	%rax, %rax
	je	LBB0_14
## %bb.2:
	movq	%rax, %r12
	movq	8(%r14), %rax
	movq	%rax, 48(%r12)
	movq	%r14, 64(%r12)
	movq	(%rbx), %rax
	movq	%rax, 80(%r12)
	movl	(%r14), %edi
	leaq	88(%r12), %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	callq	_of_property_read_u32
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	$0, (%rbx)
LBB0_4:
	movq	%r12, %rdi
	callq	_ar8xxx_read_id
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.5:
	movq	%r12, %rdi
	callq	_ar8xxx_probe_switch
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.6:
	movq	80(%r12), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_9
## %bb.7:
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_devm_mdiobus_alloc
	movq	%rax, 72(%r12)
	leaq	L_.str.1(%rip), %rcx
	movq	%rcx, (%rax)
	movq	_ar8xxx_phy_read@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 36(%rax)
	movq	_ar8xxx_phy_write@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 32(%rax)
	movq	%r12, 24(%rax)
	movq	%r14, 16(%rax)
	movl	8(%rax), %r15d
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_dev_name
	leaq	L_.str.2(%rip), %rdx
	movl	%r15d, %edi
	movl	%ebx, %esi
	movq	%rax, %rcx
	callq	_snprintf
	movq	64(%r12), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_of_get_child_by_name
	movq	72(%r12), %rdi
	movq	%rax, %rsi
	callq	_of_mdiobus_register
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_12
LBB0_9:
	leaq	8(%r12), %rbx
	movq	%r14, %rdi
	callq	_dev_name
	movq	%rax, 8(%r12)
	movq	64(%r12), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_of_property_read_bool
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	$1, (%r12)
	decl	24(%r12)
LBB0_11:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_register_switch
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_17
LBB0_12:
	movq	%r12, %rdi
	callq	_ar8xxx_free
	jmp	LBB0_16
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	jmp	LBB0_15
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_15:
	subl	(%rax), %r13d
LBB0_16:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	16(%r12), %r13d
	movl	20(%r12), %ebx
	movl	56(%r12), %r15d
	movq	48(%r12), %rdi
	callq	_dev_name
	leaq	L_.str.5(%rip), %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movl	%r15d, %ecx
	movq	%rax, %r8
	callq	_pr_info
	movq	_ar8xxx_dev_list_lock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	addq	$40, %rdi
	movq	_ar8xxx_dev_list@GOTPCREL(%rip), %rsi
	callq	_list_add
	movq	%rbx, %rdi
	callq	_mutex_unlock
	incq	32(%r12)
	movq	%r12, %rdi
	callq	_ar8xxx_start
	testl	%eax, %eax
	je	LBB0_20
## %bb.18:
	movl	%eax, %r13d
	decq	32(%r12)
	jne	LBB0_16
## %bb.19:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_unregister_switch
	jmp	LBB0_12
LBB0_20:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_dev_set_drvdata
	xorl	%r13d, %r13d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_ar8xxx_mdiodev_of_match,4,2    ## @ar8xxx_mdiodev_of_match
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"qca,mib-poll-interval"

L_.str.1:                               ## @.str.1
	.asciz	"ar8xxx-mdio"

	.comm	_ar8xxx_phy_read,4,2            ## @ar8xxx_phy_read
	.comm	_ar8xxx_phy_write,4,2           ## @ar8xxx_phy_write
	.comm	_MII_BUS_ID_SIZE,4,2            ## @MII_BUS_ID_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"%s"

L_.str.3:                               ## @.str.3
	.asciz	"mdio-bus"

L_.str.4:                               ## @.str.4
	.asciz	"qca,phy4-mii-enable"

L_.str.5:                               ## @.str.5
	.asciz	"%s: %s rev. %u switch registered on %s\n"

	.comm	_ar8xxx_dev_list_lock,4,2       ## @ar8xxx_dev_list_lock
	.comm	_ar8xxx_dev_list,4,2            ## @ar8xxx_dev_list
	.no_dead_strip	_ar8xxx_mdiodev_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar8xxx_mdiodev_probe
_ar8xxx_mdiodev_probe:                  ; @ar8xxx_mdiodev_probe
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
Lloh0:
	adrp	x8, _ar8xxx_mdiodev_of_match@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ar8xxx_mdiodev_of_match@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_of_match_device
	cbz	x0, LBB0_13
; %bb.1:
	mov	x21, x0
	bl	_ar8xxx_create
	cbz	x0, LBB0_14
; %bb.2:
	mov	x19, x0
	ldr	x8, [x20, #8]
	str	x8, [x0, #48]
	str	x20, [x0, #64]
	ldr	x8, [x21]
	str	x8, [x0, #80]
	ldr	w0, [x20]
	add	x21, x19, #88
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_of_property_read_u32
	cbz	w0, LBB0_4
; %bb.3:
	str	xzr, [x21]
LBB0_4:
	mov	x0, x19
	bl	_ar8xxx_read_id
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.5:
	mov	x0, x19
	bl	_ar8xxx_probe_switch
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.6:
	ldr	x8, [x19, #80]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_9
; %bb.7:
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_devm_mdiobus_alloc
	str	x0, [x19, #72]
Lloh5:
	adrp	x8, l_.str.1@PAGE
Lloh6:
	add	x8, x8, l_.str.1@PAGEOFF
	str	x8, [x0]
Lloh7:
	adrp	x8, _ar8xxx_phy_read@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ar8xxx_phy_read@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _ar8xxx_phy_write@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ar8xxx_phy_write@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #32]
	stp	x20, x19, [x0, #16]
	ldr	w21, [x0, #8]
Lloh13:
	adrp	x8, _MII_BUS_ID_SIZE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MII_BUS_ID_SIZE@GOTPAGEOFF]
Lloh15:
	ldr	w22, [x8]
	mov	x0, x20
	bl	_dev_name
	mov	x3, x0
Lloh16:
	adrp	x2, l_.str.2@PAGE
Lloh17:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x1, x22
	bl	_snprintf
	ldr	x8, [x19, #64]
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_of_get_child_by_name
	mov	x1, x0
	ldr	x0, [x19, #72]
	bl	_of_mdiobus_register
	mov	x22, x0
	cbnz	w0, LBB0_12
LBB0_9:
	mov	x0, x20
	bl	_dev_name
	mov	x21, x19
	str	x0, [x21, #8]!
	ldr	x8, [x21, #56]
	ldr	w0, [x8]
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_of_property_read_bool
	cbz	x0, LBB0_11
; %bb.10:
	mov	w8, #1
	str	w8, [x19]
	ldr	w8, [x19, #24]
	sub	w8, w8, #1
	str	w8, [x19, #24]
LBB0_11:
	mov	x0, x21
	mov	x1, #0
	bl	_register_switch
	mov	x22, x0
	cbz	w0, LBB0_17
LBB0_12:
	mov	x0, x19
	bl	_ar8xxx_free
	b	LBB0_16
LBB0_13:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_16:
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_17:
	ldp	w23, w22, [x19, #16]
	ldr	w24, [x19, #56]
	ldr	x0, [x19, #48]
	bl	_dev_name
	mov	x4, x0
Lloh26:
	adrp	x0, l_.str.5@PAGE
Lloh27:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x22
	mov	x2, x23
	mov	x3, x24
	bl	_pr_info
Lloh28:
	adrp	x22, _ar8xxx_dev_list_lock@GOTPAGE
Lloh29:
	ldr	x22, [x22, _ar8xxx_dev_list_lock@GOTPAGEOFF]
	mov	x0, x22
	bl	_mutex_lock
	add	x0, x19, #40
Lloh30:
	adrp	x1, _ar8xxx_dev_list@GOTPAGE
Lloh31:
	ldr	x1, [x1, _ar8xxx_dev_list@GOTPAGEOFF]
	bl	_list_add
	mov	x0, x22
	bl	_mutex_unlock
	ldr	x8, [x19, #32]
	add	x8, x8, #1
	str	x8, [x19, #32]
	mov	x0, x19
	bl	_ar8xxx_start
	mov	x22, x0
	cbz	w0, LBB0_20
; %bb.18:
	ldr	x8, [x19, #32]
	subs	x8, x8, #1
	str	x8, [x19, #32]
	b.ne	LBB0_16
; %bb.19:
	mov	x0, x21
	bl	_unregister_switch
	b	LBB0_12
LBB0_20:
	mov	x0, x20
	mov	x1, x19
	bl	_dev_set_drvdata
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	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	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ar8xxx_mdiodev_of_match,4,2    ; @ar8xxx_mdiodev_of_match
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"qca,mib-poll-interval"

l_.str.1:                               ; @.str.1
	.asciz	"ar8xxx-mdio"

	.comm	_ar8xxx_phy_read,4,2            ; @ar8xxx_phy_read
	.comm	_ar8xxx_phy_write,4,2           ; @ar8xxx_phy_write
	.comm	_MII_BUS_ID_SIZE,4,2            ; @MII_BUS_ID_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"%s"

l_.str.3:                               ; @.str.3
	.asciz	"mdio-bus"

l_.str.4:                               ; @.str.4
	.asciz	"qca,phy4-mii-enable"

l_.str.5:                               ; @.str.5
	.asciz	"%s: %s rev. %u switch registered on %s\n"

	.comm	_ar8xxx_dev_list_lock,4,2       ; @ar8xxx_dev_list_lock
	.comm	_ar8xxx_dev_list,4,2            ; @ar8xxx_dev_list
	.no_dead_strip	_ar8xxx_mdiodev_probe
.subsections_via_symbols
