	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b53_mdio_probe
_b53_mdio_probe:                        ## @b53_mdio_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	(%rdi), %rdx
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.1:
	movq	_BRCM_PSEUDO_PHY_ADDR@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_4
## %bb.2:
	addq	$8, %r12
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	jmp	LBB0_3
LBB0_4:
	movq	16(%r12), %rdi
	xorl	%esi, %esi
	movl	$2, %edx
	callq	_mdiobus_read
	movl	%eax, %ebx
	shll	$16, %ebx
	movq	16(%r12), %rdi
	xorl	%esi, %esi
	movl	$3, %edx
	callq	_mdiobus_read
	orl	%ebx, %eax
	movl	%eax, %ecx
	andl	$-1024, %ecx                    ## imm = 0xFC00
	movq	_B53_BRCM_OUI_1@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	je	LBB0_9
## %bb.5:
	movq	_B53_BRCM_OUI_2@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	je	LBB0_9
## %bb.6:
	movq	_B53_BRCM_OUI_3@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	je	LBB0_9
## %bb.7:
	movq	_B53_BRCM_OUI_4@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	je	LBB0_9
## %bb.8:
	addq	$8, %r12
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
LBB0_3:
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_12:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_18:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	callq	_of_machine_is_compatible
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movq	16(%r12), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_13:
	leaq	8(%r12), %r14
	movq	16(%r12), %rdx
	movq	_b53_mdio_ops@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_b53_switch_alloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:
	movq	%rax, %r15
	movl	$255, (%rax)
	movq	16(%r12), %rax
	movq	%rax, 8(%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_dev_set_drvdata
	movq	%r15, %rdi
	callq	_b53_switch_register
	testl	%eax, %eax
	je	LBB0_16
## %bb.17:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_18
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_16:
	xorl	%ebx, %ebx
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_BRCM_PSEUDO_PHY_ADDR,8,3       ## @BRCM_PSEUDO_PHY_ADDR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"leaving address %d to PHY\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_B53_BRCM_OUI_1,4,2             ## @B53_BRCM_OUI_1
	.comm	_B53_BRCM_OUI_2,4,2             ## @B53_BRCM_OUI_2
	.comm	_B53_BRCM_OUI_3,4,2             ## @B53_BRCM_OUI_3
	.comm	_B53_BRCM_OUI_4,4,2             ## @B53_BRCM_OUI_4
L_.str.1:                               ## @.str.1
	.asciz	"Unsupported device: 0x%08x\n"

L_.str.2:                               ## @.str.2
	.asciz	"brcm,bcm7445d0"

L_.str.3:                               ## @.str.3
	.asciz	"sf2 slave mii"

	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
	.comm	_b53_mdio_ops,4,2               ## @b53_mdio_ops
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.4:                               ## @.str.4
	.asciz	"failed to register switch: %i\n"

	.no_dead_strip	_b53_mdio_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b53_mdio_probe
_b53_mdio_probe:                        ; @b53_mdio_probe
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x2, [x0]
Lloh0:
	adrp	x8, _BRCM_PSEUDO_PHY_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BRCM_PSEUDO_PHY_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x2, #0
	ccmp	x2, x8, #4, ne
	b.ne	LBB0_5
; %bb.1:
	ldr	x0, [x19, #16]
	mov	w1, #0
	mov	w2, #2
	bl	_mdiobus_read
	mov	x20, x0
	ldr	x0, [x19, #16]
	mov	w1, #0
	mov	w2, #3
	bl	_mdiobus_read
	orr	w2, w0, w20, lsl #16
	and	w8, w2, #0xfffffc00
Lloh3:
	adrp	x9, _B53_BRCM_OUI_1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _B53_BRCM_OUI_1@GOTPAGEOFF]
Lloh5:
	adrp	x10, _B53_BRCM_OUI_2@GOTPAGE
Lloh6:
	ldr	x10, [x10, _B53_BRCM_OUI_2@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	ldr	w10, [x10]
Lloh9:
	adrp	x11, _B53_BRCM_OUI_3@GOTPAGE
Lloh10:
	ldr	x11, [x11, _B53_BRCM_OUI_3@GOTPAGEOFF]
Lloh11:
	adrp	x12, _B53_BRCM_OUI_4@GOTPAGE
Lloh12:
	ldr	x12, [x12, _B53_BRCM_OUI_4@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
Lloh14:
	ldr	w12, [x12]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	ccmp	w8, w11, #4, ne
	ccmp	w8, w12, #4, ne
	b.ne	LBB0_6
; %bb.2:
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_of_machine_is_compatible
	cbz	x0, LBB0_10
; %bb.3:
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_10
; %bb.4:
Lloh19:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
	add	x0, x19, #8
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	b	LBB0_7
LBB0_6:
	add	x0, x19, #8
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	bl	_dev_err
Lloh25:
	adrp	x8, _ENODEV@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
	add	x20, x19, #8
	ldr	x2, [x19, #16]
Lloh27:
	adrp	x1, _b53_mdio_ops@GOTPAGE
Lloh28:
	ldr	x1, [x1, _b53_mdio_ops@GOTPAGEOFF]
	mov	x0, x20
	bl	_b53_switch_alloc
	cbz	x0, LBB0_13
; %bb.11:
	mov	x21, x0
	mov	w8, #255
	str	w8, [x0]
	ldr	x8, [x19, #16]
	str	x8, [x0, #8]
	mov	x0, x20
	mov	x1, x21
	bl	_dev_set_drvdata
	mov	x0, x21
	bl	_b53_switch_register
	mov	x19, x0
	cbz	w0, LBB0_9
; %bb.12:
Lloh29:
	adrp	x1, l_.str.4@PAGE
Lloh30:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_dev_err
	b	LBB0_9
LBB0_13:
Lloh31:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_BRCM_PSEUDO_PHY_ADDR,8,3       ; @BRCM_PSEUDO_PHY_ADDR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"leaving address %d to PHY\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_B53_BRCM_OUI_1,4,2             ; @B53_BRCM_OUI_1
	.comm	_B53_BRCM_OUI_2,4,2             ; @B53_BRCM_OUI_2
	.comm	_B53_BRCM_OUI_3,4,2             ; @B53_BRCM_OUI_3
	.comm	_B53_BRCM_OUI_4,4,2             ; @B53_BRCM_OUI_4
l_.str.1:                               ; @.str.1
	.asciz	"Unsupported device: 0x%08x\n"

l_.str.2:                               ; @.str.2
	.asciz	"brcm,bcm7445d0"

l_.str.3:                               ; @.str.3
	.asciz	"sf2 slave mii"

	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
	.comm	_b53_mdio_ops,4,2               ; @b53_mdio_ops
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.4:                               ; @.str.4
	.asciz	"failed to register switch: %i\n"

	.no_dead_strip	_b53_mdio_probe
.subsections_via_symbols
