	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpc_mii_init
_lpc_mii_init:                          ## @lpc_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, %rbx
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_mdiobus_alloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	16(%rbx), %rdi
	addq	$12, %rdi
	callq	_lpc_phy_interface_mode
	movq	_PHY_INTERFACE_MODE_MII@GOTPCREL(%rip), %rcx
	movq	_LPC_COMMAND_PASSRUNTFRAME@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r15d
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movl	24(%rbx), %edi
	callq	_LPC_ENET_COMMAND
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_9
LBB0_4:
	movq	_LPC_COMMAND_RMII@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movl	24(%rbx), %edi
	callq	_LPC_ENET_COMMAND
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_writel
	movq	_LPC_SUPP_RESET_RMII@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	24(%rbx), %edi
	callq	_LPC_ENET_SUPP
LBB0_5:
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_writel
	movq	(%rbx), %rax
	leaq	L_.str(%rip), %rcx
	movq	%rcx, (%rax)
	movq	_lpc_mdio_read@GOTPCREL(%rip), %rcx
	movq	%rcx, 48(%rax)
	movq	_lpc_mdio_write@GOTPCREL(%rip), %rcx
	movq	%rcx, 40(%rax)
	movq	_lpc_mdio_reset@GOTPCREL(%rip), %rcx
	movq	%rcx, 32(%rax)
	movl	24(%rax), %edi
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%rbx), %rax
	movq	(%rax), %rcx
	movl	8(%rax), %r8d
	leaq	L_.str.1(%rip), %rdx
	callq	_snprintf
	movq	(%rbx), %rsi
	movq	%rbx, 16(%rsi)
	movq	16(%rbx), %rdi
	leaq	12(%rdi), %rax
	movq	%rax, 8(%rsi)
	callq	_platform_set_drvdata
	movq	(%rbx), %rdi
	callq	_mdiobus_register
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movl	8(%rbx), %edi
	callq	_lpc_mii_probe
	testq	%rax, %rax
	je	LBB0_7
LBB0_8:
	movq	(%rbx), %rdi
	callq	_mdiobus_unregister
	movq	(%rbx), %rdi
	callq	_mdiobus_free
LBB0_9:
	negl	%r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%r14d, %r14d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PHY_INTERFACE_MODE_MII,8,3     ## @PHY_INTERFACE_MODE_MII
	.comm	_LPC_COMMAND_PASSRUNTFRAME,4,2  ## @LPC_COMMAND_PASSRUNTFRAME
	.comm	_LPC_COMMAND_RMII,4,2           ## @LPC_COMMAND_RMII
	.comm	_LPC_SUPP_RESET_RMII,4,2        ## @LPC_SUPP_RESET_RMII
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"lpc_mii_bus"

	.comm	_lpc_mdio_read,4,2              ## @lpc_mdio_read
	.comm	_lpc_mdio_write,4,2             ## @lpc_mdio_write
	.comm	_lpc_mdio_reset,4,2             ## @lpc_mdio_reset
	.comm	_MII_BUS_ID_SIZE,4,2            ## @MII_BUS_ID_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"%s-%x"

	.no_dead_strip	_lpc_mii_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lpc_mii_init
_lpc_mii_init:                          ; @lpc_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	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_3
; %bb.1:
	ldr	x8, [x19, #16]
	add	x0, x8, #12
	bl	_lpc_phy_interface_mode
Lloh3:
	adrp	x8, _PHY_INTERFACE_MODE_MII@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_MII@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _LPC_COMMAND_PASSRUNTFRAME@GOTPAGE
Lloh7:
	ldr	x9, [x9, _LPC_COMMAND_PASSRUNTFRAME@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x9]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.2:
	ldr	w0, [x19, #24]
	bl	_LPC_ENET_COMMAND
	b	LBB0_5
LBB0_3:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
	b	LBB0_8
LBB0_4:
Lloh12:
	adrp	x8, _LPC_COMMAND_RMII@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LPC_COMMAND_RMII@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w20, w8, w20
	ldr	w0, [x19, #24]
	bl	_LPC_ENET_COMMAND
	mov	x1, x0
	mov	x0, x20
	bl	_writel
Lloh15:
	adrp	x8, _LPC_SUPP_RESET_RMII@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LPC_SUPP_RESET_RMII@GOTPAGEOFF]
Lloh17:
	ldr	w20, [x8]
	ldr	w0, [x19, #24]
	bl	_LPC_ENET_SUPP
LBB0_5:
	mov	x1, x0
	mov	x0, x20
	bl	_writel
Lloh18:
	adrp	x8, l_.str@PAGE
Lloh19:
	add	x8, x8, l_.str@PAGEOFF
	ldr	x9, [x19]
	str	x8, [x9]
Lloh20:
	adrp	x8, _lpc_mdio_read@GOTPAGE
Lloh21:
	ldr	x8, [x8, _lpc_mdio_read@GOTPAGEOFF]
Lloh22:
	adrp	x10, _lpc_mdio_write@GOTPAGE
Lloh23:
	ldr	x10, [x10, _lpc_mdio_write@GOTPAGEOFF]
	str	x8, [x9, #48]
Lloh24:
	adrp	x8, _lpc_mdio_reset@GOTPAGE
Lloh25:
	ldr	x8, [x8, _lpc_mdio_reset@GOTPAGEOFF]
	stp	x8, x10, [x9, #32]
	ldr	w0, [x9, #24]
Lloh26:
	adrp	x8, _MII_BUS_ID_SIZE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MII_BUS_ID_SIZE@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	ldr	x8, [x19, #16]
	ldr	x3, [x8]
	ldr	w4, [x8, #8]
Lloh29:
	adrp	x2, l_.str.1@PAGE
Lloh30:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_snprintf
	ldr	x1, [x19]
	ldr	x0, [x19, #16]
	add	x8, x0, #12
	stp	x8, x19, [x1, #8]
	bl	_platform_set_drvdata
	ldr	x0, [x19]
	bl	_mdiobus_register
	cbnz	x0, LBB0_7
; %bb.6:
	ldr	w0, [x19, #8]
	bl	_lpc_mii_probe
	cbz	x0, LBB0_9
LBB0_7:
	ldr	x0, [x19]
	bl	_mdiobus_unregister
	ldr	x0, [x19]
	bl	_mdiobus_free
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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PHY_INTERFACE_MODE_MII,8,3     ; @PHY_INTERFACE_MODE_MII
	.comm	_LPC_COMMAND_PASSRUNTFRAME,4,2  ; @LPC_COMMAND_PASSRUNTFRAME
	.comm	_LPC_COMMAND_RMII,4,2           ; @LPC_COMMAND_RMII
	.comm	_LPC_SUPP_RESET_RMII,4,2        ; @LPC_SUPP_RESET_RMII
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"lpc_mii_bus"

	.comm	_lpc_mdio_read,4,2              ; @lpc_mdio_read
	.comm	_lpc_mdio_write,4,2             ; @lpc_mdio_write
	.comm	_lpc_mdio_reset,4,2             ; @lpc_mdio_reset
	.comm	_MII_BUS_ID_SIZE,4,2            ; @MII_BUS_ID_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"%s-%x"

	.no_dead_strip	_lpc_mii_init
.subsections_via_symbols
