	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcmgenet_mii_pd_init
_bcmgenet_mii_pd_init:                  ## @bcmgenet_mii_pd_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %r15
	leaq	8(%r15), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	8(%r15), %r14
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leal	3(%rbx), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	_UNIMAC_MDIO_DRV_NAME@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	(%r15), %r8d
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_snprintf
	movq	(%r14), %rax
	movq	_PHY_INTERFACE_MODE_MOCA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.1:
	cmpq	$0, 24(%r14)
	je	LBB0_4
## %bb.2:
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PHY_ID_FMT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movl	8(%r14), %r8d
	movq	%r12, %rdi
	movq	%r13, %rcx
	callq	_snprintf
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	8(%rbx), %edi
	movq	(%r14), %rdx
	movq	%r12, %rsi
	callq	_phy_attach
	testq	%rax, %rax
	jne	LBB0_7
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_8
LBB0_4:
	movq	$1, -88(%rbp)
	movl	$0, -80(%rbp)
	movl	12(%r14), %eax
	movl	%eax, -76(%rbp)
	movl	16(%r14), %eax
	movl	%eax, -72(%rbp)
	movq	_PHY_POLL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r12d, %r12d
	leaq	-88(%rbp), %rsi
	xorl	%edx, %edx
	callq	_fixed_phy_register
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_8
LBB0_6:
	movq	$0, (%rbx)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_7:
	movq	(%r14), %rax
	movq	%rax, (%rbx)
	xorl	%r12d, %r12d
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.9:
	movl	%r12d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_BUS_ID_SIZE,4,2            ## @MII_BUS_ID_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s-%d"

	.comm	_UNIMAC_MDIO_DRV_NAME,8,3       ## @UNIMAC_MDIO_DRV_NAME
	.comm	_PHY_INTERFACE_MODE_MOCA,8,3    ## @PHY_INTERFACE_MODE_MOCA
	.comm	_PHY_ID_FMT,8,3                 ## @PHY_ID_FMT
L_.str.1:                               ## @.str.1
	.asciz	"failed to register PHY device\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_PHY_POLL,4,2                   ## @PHY_POLL
L_.str.2:                               ## @.str.2
	.asciz	"failed to register fixed PHY device\n"

	.no_dead_strip	_bcmgenet_mii_pd_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function bcmgenet_mii_pd_init
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_bcmgenet_mii_pd_init:                  ; @bcmgenet_mii_pd_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #32
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x12, [x0, #16]
	mov	x20, x12
	ldr	x23, [x20, #8]!
Lloh3:
	adrp	x24, _MII_BUS_ID_SIZE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _MII_BUS_ID_SIZE@GOTPAGEOFF]
	ldr	w1, [x24]
	add	w8, w1, #3
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	mov	x9, x1
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x1, #15
	and	x9, x9, #0x1fffffff0
	sub	x22, x8, x9
	mov	sp, x22
Lloh9:
	adrp	x8, _UNIMAC_MDIO_DRV_NAME@GOTPAGE
Lloh10:
	ldr	x8, [x8, _UNIMAC_MDIO_DRV_NAME@GOTPAGEOFF]
Lloh11:
	ldr	x3, [x8]
	ldr	w4, [x12]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_snprintf
	ldr	x8, [x23]
Lloh14:
	adrp	x9, _PHY_INTERFACE_MODE_MOCA@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PHY_INTERFACE_MODE_MOCA@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.1:
	ldr	x8, [x23, #24]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	w1, [x24]
Lloh17:
	adrp	x8, _PHY_ID_FMT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PHY_ID_FMT@GOTPAGEOFF]
Lloh19:
	ldr	x2, [x8]
	ldr	w4, [x23, #8]
	mov	x0, x21
	mov	x3, x22
	bl	_snprintf
	ldr	w0, [x19, #8]
	ldr	x2, [x23]
	mov	x1, x21
	bl	_phy_attach
	cbnz	x0, LBB0_9
; %bb.3:
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_4:
Lloh22:
	adrp	x8, lCPI0_0@PAGE
Lloh23:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x29, #-80]
	stur	wzr, [x29, #-72]
	ldur	d0, [x23, #12]
	stur	d0, [x29, #-68]
Lloh24:
	adrp	x8, _PHY_POLL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PHY_POLL@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	sub	x1, x29, #80
	mov	x2, #0
	bl	_fixed_phy_register
	cbz	x0, LBB0_6
; %bb.5:
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_8
LBB0_6:
Lloh27:
	adrp	x1, l_.str.2@PAGE
Lloh28:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_7:
	mov	x0, x20
	bl	_dev_err
Lloh29:
	adrp	x8, _ENODEV@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_8:
	str	xzr, [x21]
LBB0_9:
	mov	w0, #0
	ldr	x8, [x23]
	str	x8, [x19]
LBB0_10:
	ldur	x8, [x29, #-56]
Lloh32:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh33:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdrp	Lloh22, Lloh24
	.loh AdrpLdr	Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_BUS_ID_SIZE,4,2            ; @MII_BUS_ID_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s-%d"

	.comm	_UNIMAC_MDIO_DRV_NAME,8,3       ; @UNIMAC_MDIO_DRV_NAME
	.comm	_PHY_INTERFACE_MODE_MOCA,8,3    ; @PHY_INTERFACE_MODE_MOCA
	.comm	_PHY_ID_FMT,8,3                 ; @PHY_ID_FMT
l_.str.1:                               ; @.str.1
	.asciz	"failed to register PHY device\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_PHY_POLL,4,2                   ; @PHY_POLL
l_.str.2:                               ; @.str.2
	.asciz	"failed to register fixed PHY device\n"

	.no_dead_strip	_bcmgenet_mii_pd_init
.subsections_via_symbols
