	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tc_mii_init
_tc_mii_init:                           ## @tc_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r15
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_mdiobus_alloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	L_.str(%rip), %rcx
	movq	%rcx, (%rax)
	movq	_tc_mdio_read@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 32(%rax)
	movq	_tc_mdio_write@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 28(%rax)
	movl	24(%rax), %edi
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r15), %rax
	movq	8(%rax), %rcx
	movl	(%rcx), %ecx
	shll	$8, %ecx
	orl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rdx
	callq	_snprintf
	movq	(%r15), %rdi
	movq	%r14, 16(%rdi)
	movq	8(%r15), %rax
	addq	$4, %rax
	movq	%rax, 8(%rdi)
	callq	_mdiobus_register
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	%r14, %rdi
	callq	_tc_mii_probe
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %ebx
	movq	(%r15), %rdi
	callq	_mdiobus_unregister
LBB0_6:
	movq	(%r15), %rdi
	callq	_mdiobus_free
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_4:
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tc35815_mii_bus"

	.comm	_tc_mdio_read,4,2               ## @tc_mdio_read
	.comm	_tc_mdio_write,4,2              ## @tc_mdio_write
	.comm	_MII_BUS_ID_SIZE,4,2            ## @MII_BUS_ID_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"%x"

	.no_dead_strip	_tc_mii_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tc_mii_init
_tc_mii_init:                           ; @tc_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
	bl	_mdiobus_alloc
	str	x0, [x19]
	cbz	x0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x0]
Lloh2:
	adrp	x8, _tc_mdio_read@GOTPAGE
Lloh3:
	ldr	x8, [x8, _tc_mdio_read@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _tc_mdio_write@GOTPAGE
Lloh6:
	ldr	x9, [x9, _tc_mdio_write@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #28]
	ldr	w0, [x0, #24]
Lloh8:
	adrp	x8, _MII_BUS_ID_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MII_BUS_ID_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	x8, [x19, #8]
	ldr	x9, [x8, #8]
	ldr	w9, [x9]
	ldr	w8, [x8]
	orr	w3, w8, w9, lsl #8
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_snprintf
	ldp	x0, x8, [x19]
	add	x8, x8, #4
	stp	x8, x20, [x0, #8]
	bl	_mdiobus_register
	mov	x21, x0
	cbnz	w0, LBB0_4
; %bb.2:
	mov	x0, x20
	bl	_tc_mii_probe
	mov	x21, x0
	cbz	w0, LBB0_6
; %bb.3:
	ldr	x0, [x19]
	bl	_mdiobus_unregister
LBB0_4:
	ldr	x0, [x19]
	bl	_mdiobus_free
	b	LBB0_6
LBB0_5:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_6:
	mov	x0, x21
	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
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tc35815_mii_bus"

	.comm	_tc_mdio_read,4,2               ; @tc_mdio_read
	.comm	_tc_mdio_write,4,2              ; @tc_mdio_write
	.comm	_MII_BUS_ID_SIZE,4,2            ; @MII_BUS_ID_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"%x"

	.no_dead_strip	_tc_mii_init
.subsections_via_symbols
