	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltq_etop_mdio_init
_ltq_etop_mdio_init:                    ## @ltq_etop_mdio_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	%eax, %eax
	callq	_mdiobus_alloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r14, 24(%rax)
	movq	_ltq_etop_mdio_rd@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rax)
	movq	_ltq_etop_mdio_wr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rax)
	leaq	L_.str.1(%rip), %rcx
	movq	%rcx, (%rax)
	movl	8(%rax), %edi
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r15), %rax
	movq	(%rax), %rcx
	movl	8(%rax), %r8d
	leaq	L_.str.2(%rip), %rdx
	callq	_snprintf
	movq	(%r15), %rdi
	callq	_mdiobus_register
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_8
LBB0_4:
	movq	%r14, %rdi
	callq	_ltq_etop_mdio_probe
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	(%r15), %rdi
	callq	_mdiobus_unregister
LBB0_7:
	movq	(%r15), %rdi
	callq	_mdiobus_free
LBB0_8:
	negl	%ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate mii bus\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ltq_etop_mdio_rd,4,2           ## @ltq_etop_mdio_rd
	.comm	_ltq_etop_mdio_wr,4,2           ## @ltq_etop_mdio_wr
L_.str.1:                               ## @.str.1
	.asciz	"ltq_mii"

	.comm	_MII_BUS_ID_SIZE,4,2            ## @MII_BUS_ID_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"%s-%x"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_ltq_etop_mdio_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltq_etop_mdio_init
_ltq_etop_mdio_init:                    ; @ltq_etop_mdio_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_netdev_priv
	mov	x19, x0
	bl	_mdiobus_alloc
	str	x0, [x19]
	cbz	x0, LBB0_3
; %bb.1:
	str	x20, [x0, #24]
Lloh0:
	adrp	x8, _ltq_etop_mdio_rd@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ltq_etop_mdio_rd@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _ltq_etop_mdio_wr@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ltq_etop_mdio_wr@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #12]
Lloh6:
	adrp	x8, l_.str.1@PAGE
Lloh7:
	add	x8, x8, l_.str.1@PAGEOFF
	str	x8, [x0]
	ldr	w0, [x0, #8]
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	x3, [x8]
	ldr	w4, [x8, #8]
Lloh11:
	adrp	x2, l_.str.2@PAGE
Lloh12:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	_snprintf
	ldr	x0, [x19]
	bl	_mdiobus_register
	cbz	x0, LBB0_4
; %bb.2:
Lloh13:
	adrp	x8, _ENXIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh15:
	ldr	w20, [x8]
	b	LBB0_6
LBB0_3:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w20, [x8]
	b	LBB0_7
LBB0_4:
	mov	x0, x20
	bl	_ltq_etop_mdio_probe
	cbz	x0, LBB0_8
; %bb.5:
Lloh21:
	adrp	x8, _ENXIO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh23:
	ldr	w20, [x8]
	ldr	x0, [x19]
	bl	_mdiobus_unregister
LBB0_6:
	ldr	x0, [x19]
	bl	_mdiobus_free
LBB0_7:
	neg	w0, w20
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate mii bus\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ltq_etop_mdio_rd,4,2           ; @ltq_etop_mdio_rd
	.comm	_ltq_etop_mdio_wr,4,2           ; @ltq_etop_mdio_wr
l_.str.1:                               ; @.str.1
	.asciz	"ltq_mii"

	.comm	_MII_BUS_ID_SIZE,4,2            ; @MII_BUS_ID_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"%s-%x"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_ltq_etop_mdio_init
.subsections_via_symbols
