	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gmac_speed_set
_gmac_speed_set:                        ## @gmac_speed_set
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_netdev_priv
	movq	%rax, %r14
	movq	(%r12), %rbx
	movq	_GMAC_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r14), %rdi
	callq	_readl
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %r13
	movl	8(%rbx), %r15d
	movq	%rbx, %rdi
	cmpl	$10, %r15d
	je	LBB0_6
## %bb.1:
	cmpl	$100, %r15d
	je	LBB0_5
## %bb.2:
	cmpl	$1000, %r15d                    ## imm = 0x3E8
	jne	LBB0_7
## %bb.3:
	callq	_phydev_name
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_6:
	callq	_phydev_name
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_4
LBB0_5:
	callq	_phydev_name
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_netdev_dbg
	jmp	LBB0_8
LBB0_7:
	callq	_phydev_name
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_netdev_warn
LBB0_8:
	movq	(%rbx), %rax
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	movl	$0, %edx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	_MII_ADVERTISE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_phy_read
	movl	%eax, %r15d
	movq	_MII_LPA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_phy_read
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_mii_resolve_flowctrl_fdx
	movq	_FLOW_CTRL_RX@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	testl	%eax, (%rcx)
	setne	%dl
	movq	_FLOW_CTRL_TX@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	testl	%eax, (%rcx)
	setne	%sil
LBB0_10:
	movq	%r12, %rdi
	callq	_gmac_set_flow_control
	cmpq	%r13, -48(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_11
## %bb.14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r14, %rdi
	callq	_netif_msg_link
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%rbx, %rdi
	callq	_phy_print_status
	cmpq	$0, 16(%rbx)
	leaq	L_.str.6(%rip), %rax
	leaq	L_.str.5(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str.8(%rip), %rax
	leaq	L_.str.7(%rip), %rdx
	cmoveq	%rax, %rdx
	cmpq	$0, 24(%rbx)
	cmovneq	%rcx, %rdx
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	callq	_netdev_info
LBB0_13:
	movq	%r12, %rdi
	callq	_gmac_disable_tx_rx
	movq	_GMAC_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movq	%r13, %rdi
	callq	_writel
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gmac_enable_tx_rx              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GMAC_STATUS,8,3                ## @GMAC_STATUS
	.comm	_GMAC_SPEED_1000,4,2            ## @GMAC_SPEED_1000
	.comm	_PHY_INTERFACE_MODE_RGMII,4,2   ## @PHY_INTERFACE_MODE_RGMII
	.comm	_GMAC_PHY_RGMII_1000,8,3        ## @GMAC_PHY_RGMII_1000
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"connect %s to RGMII @ 1Gbit\n"

	.comm	_GMAC_SPEED_100,4,2             ## @GMAC_SPEED_100
	.comm	_GMAC_PHY_RGMII_100_10,8,3      ## @GMAC_PHY_RGMII_100_10
L_.str.1:                               ## @.str.1
	.asciz	"connect %s to RGMII @ 100 Mbit\n"

	.comm	_GMAC_SPEED_10,4,2              ## @GMAC_SPEED_10
L_.str.2:                               ## @.str.2
	.asciz	"connect %s to RGMII @ 10 Mbit\n"

L_.str.3:                               ## @.str.3
	.asciz	"Unsupported PHY speed (%d) on %s\n"

	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_MII_ADVERTISE,4,2              ## @MII_ADVERTISE
	.comm	_MII_LPA,4,2                    ## @MII_LPA
	.comm	_FLOW_CTRL_RX,4,2               ## @FLOW_CTRL_RX
	.comm	_FLOW_CTRL_TX,4,2               ## @FLOW_CTRL_TX
L_.str.4:                               ## @.str.4
	.asciz	"link flow control: %s\n"

L_.str.5:                               ## @.str.5
	.asciz	"tx"

L_.str.6:                               ## @.str.6
	.asciz	"both"

L_.str.7:                               ## @.str.7
	.asciz	"rx"

L_.str.8:                               ## @.str.8
	.asciz	"none"

	.no_dead_strip	_gmac_speed_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gmac_speed_set
_gmac_speed_set:                        ; @gmac_speed_set
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	x22, [x19]
	ldr	x8, [x0]
Lloh0:
	adrp	x25, _GMAC_STATUS@GOTPAGE
Lloh1:
	ldr	x25, [x25, _GMAC_STATUS@GOTPAGEOFF]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
	mov	x23, x0
	ldr	x21, [x22]
	ldr	w24, [x22, #8]
	mov	x0, x22
	cmp	w24, #10
	b.eq	LBB0_4
; %bb.1:
	cmp	w24, #100
	b.eq	LBB0_5
; %bb.2:
	cmp	w24, #1000
	b.ne	LBB0_7
; %bb.3:
	bl	_phydev_name
	mov	x2, x0
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_4:
	bl	_phydev_name
	mov	x2, x0
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_5:
	bl	_phydev_name
	mov	x2, x0
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	mov	x0, x19
	bl	_netdev_dbg
	b	LBB0_8
LBB0_7:
	bl	_phydev_name
	mov	x3, x0
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x24
	bl	_netdev_warn
LBB0_8:
	ldr	x8, [x22]
Lloh10:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh11:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
Lloh13:
	adrp	x8, _MII_ADVERTISE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MII_ADVERTISE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_phy_read
	mov	x24, x0
Lloh16:
	adrp	x8, _MII_LPA@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MII_LPA@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_phy_read
	mov	x1, x0
	mov	x0, x24
	bl	_mii_resolve_flowctrl_fdx
Lloh19:
	adrp	x8, _FLOW_CTRL_RX@GOTPAGE
Lloh20:
	ldr	x8, [x8, _FLOW_CTRL_RX@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w2, ne
Lloh22:
	adrp	x8, _FLOW_CTRL_TX@GOTPAGE
Lloh23:
	ldr	x8, [x8, _FLOW_CTRL_TX@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w1, ne
	b	LBB0_11
LBB0_10:
	mov	w1, #0
	mov	w2, #0
LBB0_11:
	mov	x0, x19
	bl	_gmac_set_flow_control
	cmp	x23, x21
	b.ne	LBB0_13
; %bb.12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	x0, x20
	bl	_netif_msg_link
	cbz	x0, LBB0_15
; %bb.14:
	mov	x0, x22
	bl	_phy_print_status
Lloh25:
	adrp	x8, l_.str.5@PAGE
Lloh26:
	add	x8, x8, l_.str.5@PAGEOFF
	ldp	x10, x9, [x22, #16]
Lloh27:
	adrp	x11, l_.str.6@PAGE
Lloh28:
	add	x11, x11, l_.str.6@PAGEOFF
Lloh29:
	adrp	x12, l_.str.7@PAGE
Lloh30:
	add	x12, x12, l_.str.7@PAGEOFF
	cmp	x10, #0
	csel	x8, x11, x8, eq
Lloh31:
	adrp	x10, l_.str.8@PAGE
Lloh32:
	add	x10, x10, l_.str.8@PAGEOFF
	csel	x10, x10, x12, eq
	cmp	x9, #0
	csel	x2, x10, x8, eq
Lloh33:
	adrp	x1, l_.str.4@PAGE
Lloh34:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_netdev_info
LBB0_15:
	mov	x0, x19
	bl	_gmac_disable_tx_rx
	ldr	x8, [x20]
	ldr	x9, [x25]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_gmac_enable_tx_rx
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_GMAC_STATUS,8,3                ; @GMAC_STATUS
	.comm	_GMAC_SPEED_1000,4,2            ; @GMAC_SPEED_1000
	.comm	_PHY_INTERFACE_MODE_RGMII,4,2   ; @PHY_INTERFACE_MODE_RGMII
	.comm	_GMAC_PHY_RGMII_1000,8,3        ; @GMAC_PHY_RGMII_1000
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"connect %s to RGMII @ 1Gbit\n"

	.comm	_GMAC_SPEED_100,4,2             ; @GMAC_SPEED_100
	.comm	_GMAC_PHY_RGMII_100_10,8,3      ; @GMAC_PHY_RGMII_100_10
l_.str.1:                               ; @.str.1
	.asciz	"connect %s to RGMII @ 100 Mbit\n"

	.comm	_GMAC_SPEED_10,4,2              ; @GMAC_SPEED_10
l_.str.2:                               ; @.str.2
	.asciz	"connect %s to RGMII @ 10 Mbit\n"

l_.str.3:                               ; @.str.3
	.asciz	"Unsupported PHY speed (%d) on %s\n"

	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_MII_ADVERTISE,4,2              ; @MII_ADVERTISE
	.comm	_MII_LPA,4,2                    ; @MII_LPA
	.comm	_FLOW_CTRL_RX,4,2               ; @FLOW_CTRL_RX
	.comm	_FLOW_CTRL_TX,4,2               ; @FLOW_CTRL_TX
l_.str.4:                               ; @.str.4
	.asciz	"link flow control: %s\n"

l_.str.5:                               ; @.str.5
	.asciz	"tx"

l_.str.6:                               ; @.str.6
	.asciz	"both"

l_.str.7:                               ; @.str.7
	.asciz	"rx"

l_.str.8:                               ; @.str.8
	.asciz	"none"

	.no_dead_strip	_gmac_speed_set
.subsections_via_symbols
