	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smsc9420_mii_init
_smsc9420_mii_init:                     ## @smsc9420_mii_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	%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, %r14
	callq	_netdev_priv
	movq	%rax, %r12
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%eax, %eax
	callq	_mdiobus_alloc
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_DRV_MDIONAME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 36(%rax)
	movl	32(%rax), %edi
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%r12), %rax
	movq	8(%rax), %rcx
	movl	(%rcx), %ecx
	shll	$8, %ecx
	orl	(%rax), %ecx
	leaq	L_.str(%rip), %rdx
	callq	_snprintf
	movq	(%r12), %rdi
	movq	%r12, 24(%rdi)
	movq	_smsc9420_mii_read@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rdi)
	movq	_smsc9420_mii_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rdi)
	movq	8(%r12), %rax
	movq	%rax, 8(%rdi)
	movq	_PHY_MAX_ADDR@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	jle	LBB0_5
## %bb.3:
	xorl	%edx, %edx
	movq	_PHY_POLL@GOTPCREL(%rip), %rsi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rsi), %ebx
	movl	%ebx, (%rax,%rdx,4)
	incq	%rdx
	movslq	(%rcx), %rbx
	cmpq	%rbx, %rdx
	jl	LBB0_4
LBB0_5:
	movl	$-3, (%rdi)
	callq	_mdiobus_register
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_PROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_smsc_warn
LBB0_9:
	movq	(%r12), %rdi
	callq	_mdiobus_free
	jmp	LBB0_10
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_10:
	negl	%r15d
	movl	%r15d, %eax
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r14, %rdi
	callq	_smsc9420_mii_probe
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jns	LBB0_11
## %bb.8:
	movq	_PROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_smsc_warn
	movq	(%r12), %rdi
	callq	_mdiobus_unregister
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DRV_MDIONAME,4,2               ## @DRV_MDIONAME
	.comm	_MII_BUS_ID_SIZE,4,2            ## @MII_BUS_ID_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%x"

	.comm	_smsc9420_mii_read,4,2          ## @smsc9420_mii_read
	.comm	_smsc9420_mii_write,4,2         ## @smsc9420_mii_write
	.comm	_PHY_MAX_ADDR,4,2               ## @PHY_MAX_ADDR
	.comm	_PHY_POLL,4,2                   ## @PHY_POLL
	.comm	_PROBE,4,2                      ## @PROBE
L_.str.1:                               ## @.str.1
	.asciz	"Error registering mii bus"

L_.str.2:                               ## @.str.2
	.asciz	"Error probing mii bus"

	.no_dead_strip	_smsc9420_mii_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smsc9420_mii_init
_smsc9420_mii_init:                     ; @smsc9420_mii_init
	.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	x20, x0
	bl	_netdev_priv
	mov	x19, x0
Lloh0:
	adrp	x8, _ENXIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	bl	_mdiobus_alloc
	str	x0, [x19]
	cbz	x0, LBB0_7
; %bb.1:
Lloh3:
	adrp	x8, _DRV_MDIONAME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRV_MDIONAME@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x0, #36]
	ldr	w0, [x0, #32]
Lloh6:
	adrp	x8, _MII_BUS_ID_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MII_BUS_ID_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	x8, [x19, #16]
	ldr	x9, [x8, #8]
	ldr	w9, [x9]
	ldr	w8, [x8]
	orr	w3, w8, w9, lsl #8
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	bl	_snprintf
Lloh11:
	adrp	x9, _smsc9420_mii_read@GOTPAGE
Lloh12:
	ldr	x9, [x9, _smsc9420_mii_read@GOTPAGEOFF]
	ldp	x0, x8, [x19]
	str	x19, [x0, #24]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _smsc9420_mii_write@GOTPAGE
Lloh15:
	ldr	x10, [x10, _smsc9420_mii_write@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	stp	w10, w9, [x0, #16]
	str	x8, [x0, #8]
Lloh17:
	adrp	x9, _PHY_MAX_ADDR@GOTPAGE
Lloh18:
	ldr	x9, [x9, _PHY_MAX_ADDR@GOTPAGEOFF]
	ldr	w10, [x9]
	cmp	w10, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x10, #0
Lloh19:
	adrp	x11, _PHY_POLL@GOTPAGE
Lloh20:
	ldr	x11, [x11, _PHY_POLL@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11]
	str	w12, [x8, x10, lsl #2]
	add	x10, x10, #1
	ldrsw	x12, [x9]
	cmp	x10, x12
	b.lt	LBB0_3
LBB0_4:
	mov	w8, #-3
	str	w8, [x0]
	bl	_mdiobus_register
	cbz	x0, LBB0_10
; %bb.5:
Lloh21:
	adrp	x8, _PROBE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PROBE@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_smsc_warn
LBB0_6:
	ldr	x0, [x19]
	bl	_mdiobus_free
	b	LBB0_8
LBB0_7:
Lloh26:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh28:
	ldr	w21, [x8]
LBB0_8:
	neg	w0, w21
LBB0_9:
	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:
	mov	x0, x20
	bl	_smsc9420_mii_probe
	tbnz	x0, #63, LBB0_12
; %bb.11:
	mov	w0, #0
	b	LBB0_9
LBB0_12:
Lloh29:
	adrp	x8, _PROBE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _PROBE@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
Lloh32:
	adrp	x1, l_.str.2@PAGE
Lloh33:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_smsc_warn
	ldr	x0, [x19]
	bl	_mdiobus_unregister
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DRV_MDIONAME,4,2               ; @DRV_MDIONAME
	.comm	_MII_BUS_ID_SIZE,4,2            ; @MII_BUS_ID_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%x"

	.comm	_smsc9420_mii_read,4,2          ; @smsc9420_mii_read
	.comm	_smsc9420_mii_write,4,2         ; @smsc9420_mii_write
	.comm	_PHY_MAX_ADDR,4,2               ; @PHY_MAX_ADDR
	.comm	_PHY_POLL,4,2                   ; @PHY_POLL
	.comm	_PROBE,4,2                      ; @PROBE
l_.str.1:                               ; @.str.1
	.asciz	"Error registering mii bus"

l_.str.2:                               ; @.str.2
	.asciz	"Error probing mii bus"

	.no_dead_strip	_smsc9420_mii_init
.subsections_via_symbols
