	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dnet_mii_init
_dnet_mii_init:                         ## @dnet_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_mdiobus_alloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	L_.str(%rip), %rcx
	movq	%rcx, (%rax)
	movq	_dnet_mdio_read@GOTPCREL(%rip), %rcx
	movq	%rcx, 32(%rax)
	movq	_dnet_mdio_write@GOTPCREL(%rip), %rcx
	movq	%rcx, 24(%rax)
	movl	16(%rax), %edi
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%r14), %rax
	movq	(%rax), %rcx
	movl	8(%rax), %r8d
	leaq	L_.str.1(%rip), %rdx
	callq	_snprintf
	movq	(%r14), %rdi
	movq	%r14, 8(%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:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_4:
	movl	8(%r14), %edi
	callq	_dnet_mii_probe
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	(%r14), %rdi
	callq	_mdiobus_unregister
LBB0_7:
	negl	%ebx
	movq	(%r14), %rdi
	callq	_mdiobus_free
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dnet_mii_bus"

	.comm	_dnet_mdio_read,4,2             ## @dnet_mdio_read
	.comm	_dnet_mdio_write,4,2            ## @dnet_mdio_write
	.comm	_MII_BUS_ID_SIZE,4,2            ## @MII_BUS_ID_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"%s-%x"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dnet_mii_init
_dnet_mii_init:                         ; @dnet_mii_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	x19, x0
	bl	_mdiobus_alloc
	str	x0, [x19]
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
Lloh2:
	adrp	x9, _dnet_mdio_read@GOTPAGE
Lloh3:
	ldr	x9, [x9, _dnet_mdio_read@GOTPAGEOFF]
	str	x8, [x0]
Lloh4:
	adrp	x8, _dnet_mdio_write@GOTPAGE
Lloh5:
	ldr	x8, [x8, _dnet_mdio_write@GOTPAGEOFF]
	stp	x8, x9, [x0, #24]
	ldr	w0, [x0, #16]
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	x3, [x8]
	ldr	w4, [x8, #8]
Lloh9:
	adrp	x2, l_.str.1@PAGE
Lloh10:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_snprintf
	ldr	x0, [x19]
	str	x19, [x0, #8]
	bl	_mdiobus_register
	cbz	x0, LBB0_4
; %bb.2:
Lloh11:
	adrp	x8, _ENXIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh13:
	ldr	w20, [x8]
	b	LBB0_6
LBB0_3:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_4:
	ldr	w0, [x19, #8]
	bl	_dnet_mii_probe
	cbz	x0, LBB0_8
; %bb.5:
Lloh17:
	adrp	x8, _ENXIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh19:
	ldr	w20, [x8]
	ldr	x0, [x19]
	bl	_mdiobus_unregister
LBB0_6:
	neg	w20, w20
	ldr	x0, [x19]
	bl	_mdiobus_free
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	w20, #0
	b	LBB0_7
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dnet_mii_bus"

	.comm	_dnet_mdio_read,4,2             ; @dnet_mdio_read
	.comm	_dnet_mdio_write,4,2            ; @dnet_mdio_write
	.comm	_MII_BUS_ID_SIZE,4,2            ; @MII_BUS_ID_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"%s-%x"

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