	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function macb_mii_probe
_macb_mii_probe:                        ## @macb_mii_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
	callq	_netdev_priv
	movq	%rax, %r12
	movq	40(%rax), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	callq	_of_phy_is_fixed_link
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_of_node_get
	movq	%rax, 32(%r12)
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_of_parse_phandle
	movq	%rax, 32(%r12)
	testq	%rax, %rax
	je	LBB0_17
LBB0_4:
	movq	32(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.5:
	movl	24(%r12), %r8d
	movq	_macb_handle_link_change@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_of_phy_connect
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_25
LBB0_6:
	movq	%r12, %rdi
	callq	_macb_is_gem
	testq	%rax, %rax
	je	LBB0_12
## %bb.7:
	movq	_MACB_CAPS_GIGABIT_MODE_AVAILABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_12
## %bb.8:
	movq	_SPEED_1000@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_9:
	movl	28(%r12), %edi
	callq	_phy_find_first
	testq	%rax, %rax
	je	LBB0_16
## %bb.10:
	movq	%rax, %r15
	movl	24(%r12), %ecx
	movq	_macb_handle_link_change@GOTPCREL(%rip), %rdx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_phy_connect_direct
	testl	%eax, %eax
	je	LBB0_6
## %bb.11:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_err
	jmp	LBB0_27
LBB0_12:
	movq	_SPEED_100@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_phy_set_max_speed
	movq	_MACB_CAPS_NO_GIGABIT_HALF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_15
## %bb.14:
	movq	_ETHTOOL_LINK_MODE_1000baseT_Half_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_phy_remove_link_mode
LBB0_15:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r12)
	movl	$-1, 4(%r12)
	xorl	%ebx, %ebx
	jmp	LBB0_27
LBB0_16:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_err
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_26
LBB0_17:
	movl	28(%r12), %edi
	callq	_phy_find_first
	testq	%rax, %rax
	jne	LBB0_4
## %bb.18:
	movq	_PHY_MAX_ADDR@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_4
## %bb.19:
	xorl	%ebx, %ebx
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_21 Depth=1
	incl	%ebx
	cmpl	(%r13), %ebx
	jge	LBB0_4
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	28(%r12), %edi
	movl	%ebx, %esi
	callq	_mdiobus_scan
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_20
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	%r15, %rdi
	callq	_PTR_ERR
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	je	LBB0_20
## %bb.23:
	movq	%r15, %rdi
	callq	_PTR_ERR
	testl	%eax, %eax
	je	LBB0_4
## %bb.24:
	xorl	%ebx, %ebx
LBB0_25:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_26:
	subl	(%rax), %ebx
LBB0_27:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phy-handle"

	.comm	_PHY_MAX_ADDR,4,2               ## @PHY_MAX_ADDR
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_macb_handle_link_change,4,2    ## @macb_handle_link_change
L_.str.1:                               ## @.str.1
	.asciz	"no PHY found\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.2:                               ## @.str.2
	.asciz	"Could not attach to PHY\n"

	.comm	_MACB_CAPS_GIGABIT_MODE_AVAILABLE,4,2 ## @MACB_CAPS_GIGABIT_MODE_AVAILABLE
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_MACB_CAPS_NO_GIGABIT_HALF,4,2  ## @MACB_CAPS_NO_GIGABIT_HALF
	.comm	_ETHTOOL_LINK_MODE_1000baseT_Half_BIT,4,2 ## @ETHTOOL_LINK_MODE_1000baseT_Half_BIT
	.no_dead_strip	_macb_mii_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function macb_mii_probe
_macb_mii_probe:                        ; @macb_mii_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
	bl	_netdev_priv
	mov	x19, x0
	ldr	x8, [x0, #40]
	ldr	x21, [x8]
	cbz	x21, LBB0_4
; %bb.1:
	mov	x0, x21
	bl	_of_phy_is_fixed_link
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_of_node_get
	str	x0, [x19, #32]
	b	LBB0_4
LBB0_3:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	w2, #0
	bl	_of_parse_phandle
	str	x0, [x19, #32]
	cbz	x0, LBB0_21
LBB0_4:
	ldr	x1, [x19, #32]
	cbz	x1, LBB0_9
; %bb.5:
	ldr	w4, [x19, #24]
Lloh2:
	adrp	x2, _macb_handle_link_change@GOTPAGE
Lloh3:
	ldr	x2, [x2, _macb_handle_link_change@GOTPAGEOFF]
	mov	x0, x20
	mov	w3, #0
	bl	_of_phy_connect
	mov	x21, x0
	cbz	x0, LBB0_16
LBB0_6:
	mov	x0, x19
	bl	_macb_is_gem
	cbz	x0, LBB0_12
; %bb.7:
	ldr	w8, [x19]
Lloh4:
	adrp	x9, _MACB_CAPS_GIGABIT_MODE_AVAILABLE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MACB_CAPS_GIGABIT_MODE_AVAILABLE@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.8:
Lloh7:
	adrp	x8, _SPEED_1000@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SPEED_1000@GOTPAGEOFF]
	b	LBB0_13
LBB0_9:
	ldr	w0, [x19, #28]
	bl	_phy_find_first
	cbz	x0, LBB0_17
; %bb.10:
	mov	x21, x0
	ldr	w3, [x19, #24]
Lloh9:
	adrp	x2, _macb_handle_link_change@GOTPAGE
Lloh10:
	ldr	x2, [x2, _macb_handle_link_change@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x21
	bl	_phy_connect_direct
	cbz	w0, LBB0_6
; %bb.11:
	mov	x22, x0
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
	b	LBB0_20
LBB0_12:
Lloh13:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
LBB0_13:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_phy_set_max_speed
	ldr	w8, [x19]
Lloh15:
	adrp	x9, _MACB_CAPS_NO_GIGABIT_HALF@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MACB_CAPS_NO_GIGABIT_HALF@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.14:
Lloh18:
	adrp	x8, _ETHTOOL_LINK_MODE_1000baseT_Half_BIT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ETHTOOL_LINK_MODE_1000baseT_Half_BIT@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_phy_remove_link_mode
LBB0_15:
	mov	w22, #0
	stp	xzr, xzr, [x19, #8]
	mov	w8, #-1
	str	w8, [x19, #4]
	b	LBB0_20
LBB0_16:
Lloh21:
	adrp	x8, _ENODEV@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
Lloh25:
	adrp	x8, _ENXIO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
LBB0_19:
	neg	w22, w8
LBB0_20:
	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_21:
	ldr	w0, [x19, #28]
	bl	_phy_find_first
	cbnz	x0, LBB0_4
; %bb.22:
Lloh27:
	adrp	x24, _PHY_MAX_ADDR@GOTPAGE
Lloh28:
	ldr	x24, [x24, _PHY_MAX_ADDR@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.23:
	mov	w21, #0
Lloh29:
	adrp	x23, _ENODEV@GOTPAGE
Lloh30:
	ldr	x23, [x23, _ENODEV@GOTPAGEOFF]
	b	LBB0_25
LBB0_24:                                ;   in Loop: Header=BB0_25 Depth=1
	add	w21, w21, #1
	ldr	w8, [x24]
	cmp	w21, w8
	b.ge	LBB0_4
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #28]
	mov	x1, x21
	bl	_mdiobus_scan
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_24
; %bb.26:                               ;   in Loop: Header=BB0_25 Depth=1
	mov	x0, x22
	bl	_PTR_ERR
	ldr	w8, [x23]
	cmn	w0, w8
	b.eq	LBB0_24
; %bb.27:
	mov	x0, x22
	bl	_PTR_ERR
	cbz	w0, LBB0_4
; %bb.28:
	ldr	w8, [x23]
	b	LBB0_19
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phy-handle"

	.comm	_PHY_MAX_ADDR,4,2               ; @PHY_MAX_ADDR
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_macb_handle_link_change,4,2    ; @macb_handle_link_change
l_.str.1:                               ; @.str.1
	.asciz	"no PHY found\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.2:                               ; @.str.2
	.asciz	"Could not attach to PHY\n"

	.comm	_MACB_CAPS_GIGABIT_MODE_AVAILABLE,4,2 ; @MACB_CAPS_GIGABIT_MODE_AVAILABLE
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_MACB_CAPS_NO_GIGABIT_HALF,4,2  ; @MACB_CAPS_NO_GIGABIT_HALF
	.comm	_ETHTOOL_LINK_MODE_1000baseT_Half_BIT,4,2 ; @ETHTOOL_LINK_MODE_1000baseT_Half_BIT
	.no_dead_strip	_macb_mii_probe
.subsections_via_symbols
