	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stmmac_mdio_register           ## -- Begin function stmmac_mdio_register
	.p2align	4, 0x90
_stmmac_mdio_register:                  ## @stmmac_mdio_register
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	callq	_netdev_priv
	movq	%rax, %r15
	movq	8(%rax), %rax
	movq	32(%rax), %r12
	testq	%r12, %r12
	je	LBB0_28
## %bb.1:
	movq	24(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	(%r13), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_mdiobus_alloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r14
	movq	8(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.4:
	movq	(%r14), %rdi
	movl	$8, %edx
	callq	_memcpy
LBB0_5:
	leaq	L_.str(%rip), %rax
	movq	%rax, 8(%r14)
	movq	8(%r15), %rax
	cmpq	$0, 16(%rax)
	je	LBB0_8
## %bb.6:
	movq	_stmmac_xgmac2_mdio_read@GOTPCREL(%rip), %rcx
	movq	%rcx, 56(%r14)
	movq	_stmmac_xgmac2_mdio_write@GOTPCREL(%rip), %rcx
	movq	%rcx, 48(%r14)
	movq	_MII_XGMAC_MAX_C22ADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leal	1(%rdx), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	cmpl	%edx, (%rax)
	jle	LBB0_9
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_9:
	cmpq	$0, 24(%r12)
	je	LBB0_11
LBB0_10:
	movq	_stmmac_mdio_reset@GOTPCREL(%rip), %rax
	movq	%rax, 40(%r14)
LBB0_11:
	movl	32(%r14), %edi
	movq	_MII_BUS_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r14), %rcx
	movq	8(%r15), %rax
	movl	4(%rax), %r8d
	leaq	L_.str.2(%rip), %rdx
	callq	_snprintf
	movq	%r13, 24(%r14)
	movl	16(%r12), %eax
	movl	%eax, 20(%r14)
	movl	16(%r15), %eax
	movl	%eax, 16(%r14)
	movq	%r14, %rdi
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_of_mdiobus_register
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_err
	movq	%r14, %rdi
	callq	_mdiobus_free
	jmp	LBB0_29
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_29
LBB0_8:
	movq	_stmmac_mdio_read@GOTPCREL(%rip), %rax
	movq	%rax, 56(%r14)
	movq	_stmmac_mdio_write@GOTPCREL(%rip), %rax
	movq	%rax, 48(%r14)
	movq	_PHY_MAX_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpq	$0, 24(%r12)
	jne	LBB0_10
	jmp	LBB0_11
LBB0_13:
	movq	8(%r15), %rax
	cmpq	$0, 8(%rax)
	jne	LBB0_27
## %bb.14:
	testq	%r13, %r13
	jne	LBB0_27
## %bb.15:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_26
## %bb.16:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	%rax, %rdi
	callq	_phy_attached_info
	movl	$1, %r13d
LBB0_24:                                ##   in Loop: Header=BB0_17 Depth=1
	incq	%rbx
	cmpq	%rbx, -64(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_25
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_mdiobus_get_phy
	testq	%rax, %rax
	je	LBB0_24
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	cmpq	$0, 8(%r12)
	jne	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	(%r12), %rcx
	testq	%rcx, %rcx
	jle	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	(%r14), %rdx
	movq	%rcx, (%rdx,%rbx,8)
	movq	(%r12), %rcx
	movq	%rcx, (%rax)
LBB0_21:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	8(%r15), %rcx
	cmpl	$-1, (%rcx)
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	%ebx, (%rcx)
	jmp	LBB0_23
LBB0_25:
	testl	%r13d, %r13d
	je	LBB0_26
LBB0_27:
	movq	%r14, (%r15)
LBB0_28:
	xorl	%ebx, %ebx
LBB0_29:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	leaq	L_.str.4(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_warn
	movq	%r14, %rdi
	callq	_mdiobus_unregister
	movq	%r14, %rdi
	callq	_mdiobus_free
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stmmac"

	.comm	_stmmac_xgmac2_mdio_read,4,2    ## @stmmac_xgmac2_mdio_read
	.comm	_stmmac_xgmac2_mdio_write,4,2   ## @stmmac_xgmac2_mdio_write
	.comm	_MII_XGMAC_MAX_C22ADDR,4,2      ## @MII_XGMAC_MAX_C22ADDR
L_.str.1:                               ## @.str.1
	.asciz	"Unsupported phy_addr (max=%d)\n"

	.comm	_stmmac_mdio_read,4,2           ## @stmmac_mdio_read
	.comm	_stmmac_mdio_write,4,2          ## @stmmac_mdio_write
	.comm	_PHY_MAX_ADDR,4,2               ## @PHY_MAX_ADDR
	.comm	_stmmac_mdio_reset,4,2          ## @stmmac_mdio_reset
	.comm	_MII_BUS_ID_SIZE,4,2            ## @MII_BUS_ID_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"%s-%x"

L_.str.3:                               ## @.str.3
	.asciz	"Cannot register the MDIO bus\n"

L_.str.4:                               ## @.str.4
	.asciz	"No PHY found\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stmmac_mdio_register           ; -- Begin function stmmac_mdio_register
	.p2align	2
_stmmac_mdio_register:                  ; @stmmac_mdio_register
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x0
	bl	_netdev_priv
	ldr	x8, [x0, #8]
	ldr	x24, [x8, #32]
	cbz	x24, LBB0_11
; %bb.1:
	mov	x21, x0
	ldr	x22, [x8, #24]
	ldr	x20, [x23]
	bl	_mdiobus_alloc
	cbz	x0, LBB0_12
; %bb.2:
	mov	x19, x0
	ldr	x1, [x24, #8]
	cbz	x1, LBB0_4
; %bb.3:
	ldr	x0, [x19]
	mov	w2, #8
	bl	_memcpy
LBB0_4:
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x19, #8]
	ldr	x8, [x21, #8]
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_14
; %bb.5:
Lloh2:
	adrp	x9, _stmmac_xgmac2_mdio_read@GOTPAGE
Lloh3:
	ldr	x9, [x9, _stmmac_xgmac2_mdio_read@GOTPAGEOFF]
Lloh4:
	adrp	x10, _stmmac_xgmac2_mdio_write@GOTPAGE
Lloh5:
	ldr	x10, [x10, _stmmac_xgmac2_mdio_write@GOTPAGEOFF]
	stp	x10, x9, [x19, #48]
Lloh6:
	adrp	x9, _MII_XGMAC_MAX_C22ADDR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MII_XGMAC_MAX_C22ADDR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	add	w25, w9, #1
	ldr	w8, [x8]
	cmp	w8, w9
	b.le	LBB0_7
; %bb.6:
	str	x9, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_7:
	ldr	x8, [x24, #24]
	cbz	x8, LBB0_9
LBB0_8:
Lloh11:
	adrp	x8, _stmmac_mdio_reset@GOTPAGE
Lloh12:
	ldr	x8, [x8, _stmmac_mdio_reset@GOTPAGEOFF]
	str	x8, [x19, #40]
LBB0_9:
	ldr	w0, [x19, #32]
Lloh13:
	adrp	x8, _MII_BUS_ID_SIZE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MII_BUS_ID_SIZE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldr	x3, [x19, #8]
	ldr	x8, [x21, #8]
	ldr	w4, [x8, #4]
Lloh16:
	adrp	x2, l_.str.2@PAGE
Lloh17:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	_snprintf
	str	x23, [x19, #24]
	ldr	w8, [x24, #16]
	ldr	w9, [x21, #16]
	stp	w9, w8, [x19, #16]
	mov	x0, x19
	mov	x1, x22
	bl	_of_mdiobus_register
	cbz	w0, LBB0_15
; %bb.10:
	mov	x23, x0
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	mov	x0, x19
	bl	_mdiobus_free
	b	LBB0_29
LBB0_11:
	mov	w23, #0
	b	LBB0_29
LBB0_12:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_29
LBB0_14:
Lloh22:
	adrp	x8, _stmmac_mdio_read@GOTPAGE
Lloh23:
	ldr	x8, [x8, _stmmac_mdio_read@GOTPAGEOFF]
Lloh24:
	adrp	x9, _stmmac_mdio_write@GOTPAGE
Lloh25:
	ldr	x9, [x9, _stmmac_mdio_write@GOTPAGEOFF]
	stp	x9, x8, [x19, #48]
Lloh26:
	adrp	x8, _PHY_MAX_ADDR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PHY_MAX_ADDR@GOTPAGEOFF]
Lloh28:
	ldr	w25, [x8]
	ldr	x8, [x24, #24]
	cbnz	x8, LBB0_8
	b	LBB0_9
LBB0_15:
	ldr	x8, [x21, #8]
	ldr	x8, [x8, #8]
	cbnz	x8, LBB0_28
; %bb.16:
	cbnz	x22, LBB0_28
; %bb.17:
	cmp	w25, #1
	b.lt	LBB0_30
; %bb.18:
	mov	x22, #0
	mov	w26, #0
	mov	w23, w25
	b	LBB0_21
LBB0_19:                                ;   in Loop: Header=BB0_21 Depth=1
	bl	_phy_attached_info
	mov	w26, #1
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=1
	add	x22, x22, #1
	cmp	x23, x22
	b.eq	LBB0_27
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_mdiobus_get_phy
	cbz	x0, LBB0_20
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	ldr	x8, [x24, #8]
	cbnz	x8, LBB0_25
; %bb.23:                               ;   in Loop: Header=BB0_21 Depth=1
	ldr	x8, [x24]
	cmp	x8, #1
	b.lt	LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_21 Depth=1
	ldr	x9, [x19]
	str	x8, [x9, x22, lsl #3]
	ldr	x8, [x24]
	str	x8, [x0]
LBB0_25:                                ;   in Loop: Header=BB0_21 Depth=1
	ldr	x8, [x21, #8]
	ldr	w9, [x8]
	cmn	w9, #1
	b.ne	LBB0_19
; %bb.26:                               ;   in Loop: Header=BB0_21 Depth=1
	str	w22, [x8]
	b	LBB0_19
LBB0_27:
	cbz	w26, LBB0_30
LBB0_28:
	mov	w23, #0
	str	x19, [x21]
LBB0_29:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_30:
Lloh29:
	adrp	x1, l_.str.4@PAGE
Lloh30:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
	mov	x0, x19
	bl	_mdiobus_unregister
	mov	x0, x19
	bl	_mdiobus_free
Lloh31:
	adrp	x8, _ENODEV@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stmmac"

	.comm	_stmmac_xgmac2_mdio_read,4,2    ; @stmmac_xgmac2_mdio_read
	.comm	_stmmac_xgmac2_mdio_write,4,2   ; @stmmac_xgmac2_mdio_write
	.comm	_MII_XGMAC_MAX_C22ADDR,4,2      ; @MII_XGMAC_MAX_C22ADDR
l_.str.1:                               ; @.str.1
	.asciz	"Unsupported phy_addr (max=%d)\n"

	.comm	_stmmac_mdio_read,4,2           ; @stmmac_mdio_read
	.comm	_stmmac_mdio_write,4,2          ; @stmmac_mdio_write
	.comm	_PHY_MAX_ADDR,4,2               ; @PHY_MAX_ADDR
	.comm	_stmmac_mdio_reset,4,2          ; @stmmac_mdio_reset
	.comm	_MII_BUS_ID_SIZE,4,2            ; @MII_BUS_ID_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"%s-%x"

l_.str.3:                               ; @.str.3
	.asciz	"Cannot register the MDIO bus\n"

l_.str.4:                               ; @.str.4
	.asciz	"No PHY found\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
.subsections_via_symbols
