	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv88e6390_serdes_irq_link_sgmii
_mv88e6390_serdes_irq_link_sgmii:       ## @mv88e6390_serdes_irq_link_sgmii
	.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
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %rax
	movslq	%esi, %rcx
	movl	(%rax,%rcx,4), %ebx
	movq	_DUPLEX_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_SPEED_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_MDIO_MMD_PHYXS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_MV88E6390_SGMII_PHY_STATUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	-44(%rbp), %r8
	movl	%edx, %esi
	movl	%eax, %edx
	callq	_mv88e6390_serdes_read
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movl	%ebx, %edi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %eax
	movq	_MV88E6390_SGMII_PHY_STATUS_LINK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
## %bb.5:
	movq	_LINK_FORCED_DOWN@GOTPCREL(%rip), %rsi
	jmp	LBB0_6
LBB0_4:
	movq	_LINK_FORCED_UP@GOTPCREL(%rip), %rsi
LBB0_6:
	movl	%r15d, %ecx
	movq	%r12, %rbx
	movl	(%rsi), %r12d
	movq	_MV88E6390_SGMII_PHY_STATUS_SPD_DPL_VALID@GOTPCREL(%rip), %rsi
	testl	%eax, (%rsi)
	movl	%r14d, %r15d
	je	LBB0_21
## %bb.7:
	movq	_MV88E6390_SGMII_PHY_STATUS_DUPLEX_FULL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_8
## %bb.9:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_8:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rcx
LBB0_10:
	movl	(%rcx), %r13d
	movq	_MV88E6390_SGMII_PHY_STATUS_SPEED_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	cmpl	$133, %eax
	je	LBB0_17
## %bb.11:
	cmpl	$132, %eax
	je	LBB0_16
## %bb.12:
	cmpl	$131, %eax
	jne	LBB0_18
## %bb.13:
	movl	%edi, %eax
	cmpl	$129, %edi
	jne	LBB0_19
## %bb.14:
	movq	_SPEED_2500@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_15
LBB0_17:
	movq	_SPEED_10@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_16:
	movq	_SPEED_100@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_18:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_31
LBB0_19:
	movq	_SPEED_1000@GOTPCREL(%rip), %rax
LBB0_20:
	movl	(%rax), %ecx
LBB0_21:
	cmpl	$128, %edi
	je	LBB0_22
## %bb.23:
	cmpl	$129, %edi
	je	LBB0_15
## %bb.24:
	cmpl	$130, %edi
	jne	LBB0_26
## %bb.25:
	movq	_PHY_INTERFACE_MODE_1000BASEX@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_15:
	movq	%rdx, %r14
	movq	_PHY_INTERFACE_MODE_2500BASEX@GOTPCREL(%rip), %rax
	jmp	LBB0_28
LBB0_22:
	movq	_PHY_INTERFACE_MODE_SGMII@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_26:
	movq	_PHY_INTERFACE_MODE_NA@GOTPCREL(%rip), %rax
LBB0_27:
	movq	%rdx, %r14
LBB0_28:
	movl	(%rax), %eax
	movq	_PAUSE_OFF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r9d
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%r13d, %r8d
	callq	_mv88e6xxx_port_setup_mac
	testl	%eax, %eax
	je	LBB0_30
## %bb.29:
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_2:
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_31:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_30:
	movq	_LINK_FORCED_UP@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	cmpl	(%rax), %r12d
	sete	%dl
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_dsa_port_phylink_mac_change
	jmp	LBB0_31
	.cfi_endproc
                                        ## -- End function
	.comm	_DUPLEX_UNKNOWN,4,2             ## @DUPLEX_UNKNOWN
	.comm	_SPEED_UNKNOWN,4,2              ## @SPEED_UNKNOWN
	.comm	_MDIO_MMD_PHYXS,4,2             ## @MDIO_MMD_PHYXS
	.comm	_MV88E6390_SGMII_PHY_STATUS,4,2 ## @MV88E6390_SGMII_PHY_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't read SGMII PHY status: %d\n"

	.comm	_MV88E6390_SGMII_PHY_STATUS_LINK,4,2 ## @MV88E6390_SGMII_PHY_STATUS_LINK
	.comm	_LINK_FORCED_UP,4,2             ## @LINK_FORCED_UP
	.comm	_LINK_FORCED_DOWN,4,2           ## @LINK_FORCED_DOWN
	.comm	_MV88E6390_SGMII_PHY_STATUS_SPD_DPL_VALID,4,2 ## @MV88E6390_SGMII_PHY_STATUS_SPD_DPL_VALID
	.comm	_MV88E6390_SGMII_PHY_STATUS_DUPLEX_FULL,4,2 ## @MV88E6390_SGMII_PHY_STATUS_DUPLEX_FULL
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ## @DUPLEX_HALF
	.comm	_MV88E6390_SGMII_PHY_STATUS_SPEED_MASK,4,2 ## @MV88E6390_SGMII_PHY_STATUS_SPEED_MASK
	.comm	_SPEED_2500,4,2                 ## @SPEED_2500
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_SPEED_10,4,2                   ## @SPEED_10
L_.str.1:                               ## @.str.1
	.asciz	"invalid PHY speed\n"

	.comm	_PHY_INTERFACE_MODE_SGMII,4,2   ## @PHY_INTERFACE_MODE_SGMII
	.comm	_PHY_INTERFACE_MODE_1000BASEX,4,2 ## @PHY_INTERFACE_MODE_1000BASEX
	.comm	_PHY_INTERFACE_MODE_2500BASEX,4,2 ## @PHY_INTERFACE_MODE_2500BASEX
	.comm	_PHY_INTERFACE_MODE_NA,4,2      ## @PHY_INTERFACE_MODE_NA
	.comm	_PAUSE_OFF,4,2                  ## @PAUSE_OFF
L_.str.2:                               ## @.str.2
	.asciz	"can't propagate PHY settings to MAC: %d\n"

	.no_dead_strip	_mv88e6390_serdes_irq_link_sgmii
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv88e6390_serdes_irq_link_sgmii
_mv88e6390_serdes_irq_link_sgmii:       ; @mv88e6390_serdes_irq_link_sgmii
	.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	x8, x2
	mov	x19, x1
	mov	x20, x0
	ldp	x21, x9, [x0, #8]
	ldr	w26, [x9, w1, sxtw #2]
Lloh0:
	adrp	x9, _DUPLEX_UNKNOWN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DUPLEX_UNKNOWN@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x9]
Lloh3:
	adrp	x9, _SPEED_UNKNOWN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SPEED_UNKNOWN@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x9]
Lloh6:
	adrp	x9, _MDIO_MMD_PHYXS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MDIO_MMD_PHYXS@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x9]
Lloh9:
	adrp	x9, _MV88E6390_SGMII_PHY_STATUS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MV88E6390_SGMII_PHY_STATUS@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x9]
	add	x4, sp, #12
	mov	x1, x8
	bl	_mv88e6390_serdes_read
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w8, [x20]
	str	x0, [sp]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_20
LBB0_2:
	ldr	w8, [sp, #12]
Lloh14:
	adrp	x9, _MV88E6390_SGMII_PHY_STATUS_LINK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MV88E6390_SGMII_PHY_STATUS_LINK@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x25, _LINK_FORCED_UP@GOTPAGE
Lloh18:
	ldr	x25, [x25, _LINK_FORCED_UP@GOTPAGEOFF]
Lloh19:
	adrp	x10, _LINK_FORCED_DOWN@GOTPAGE
Lloh20:
	ldr	x10, [x10, _LINK_FORCED_DOWN@GOTPAGEOFF]
	tst	w9, w8
	csel	x9, x10, x25, eq
	ldr	w23, [x9]
Lloh21:
	adrp	x9, _MV88E6390_SGMII_PHY_STATUS_SPD_DPL_VALID@GOTPAGE
Lloh22:
	ldr	x9, [x9, _MV88E6390_SGMII_PHY_STATUS_SPD_DPL_VALID@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.3:
Lloh24:
	adrp	x9, _MV88E6390_SGMII_PHY_STATUS_DUPLEX_FULL@GOTPAGE
Lloh25:
	ldr	x9, [x9, _MV88E6390_SGMII_PHY_STATUS_DUPLEX_FULL@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
Lloh27:
	adrp	x10, _DUPLEX_FULL@GOTPAGE
Lloh28:
	ldr	x10, [x10, _DUPLEX_FULL@GOTPAGEOFF]
Lloh29:
	adrp	x11, _DUPLEX_HALF@GOTPAGE
Lloh30:
	ldr	x11, [x11, _DUPLEX_HALF@GOTPAGEOFF]
	tst	w9, w8
	csel	x9, x11, x10, eq
	ldr	w22, [x9]
Lloh31:
	adrp	x9, _MV88E6390_SGMII_PHY_STATUS_SPEED_MASK@GOTPAGE
Lloh32:
	ldr	x9, [x9, _MV88E6390_SGMII_PHY_STATUS_SPEED_MASK@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	and	w8, w9, w8
	cmp	w8, #133
	b.eq	LBB0_8
; %bb.4:
	cmp	w8, #132
	b.eq	LBB0_9
; %bb.5:
	cmp	w8, #131
	b.ne	LBB0_10
; %bb.6:
	cmp	w26, #129
	b.ne	LBB0_11
; %bb.7:
Lloh34:
	adrp	x8, _SPEED_2500@GOTPAGE
Lloh35:
	ldr	x8, [x8, _SPEED_2500@GOTPAGEOFF]
Lloh36:
	ldr	w24, [x8]
	b	LBB0_16
LBB0_8:
Lloh37:
	adrp	x8, _SPEED_10@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SPEED_10@GOTPAGEOFF]
	b	LBB0_12
LBB0_9:
Lloh39:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh40:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
	ldr	w0, [x20]
Lloh41:
	adrp	x1, l_.str.1@PAGE
Lloh42:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_21
LBB0_11:
Lloh43:
	adrp	x8, _SPEED_1000@GOTPAGE
Lloh44:
	ldr	x8, [x8, _SPEED_1000@GOTPAGEOFF]
LBB0_12:
	ldr	w24, [x8]
LBB0_13:
	cmp	w26, #128
	b.eq	LBB0_17
; %bb.14:
	cmp	w26, #129
	b.eq	LBB0_16
; %bb.15:
	cmp	w26, #130
Lloh45:
	adrp	x8, _PHY_INTERFACE_MODE_NA@GOTPAGE
Lloh46:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_NA@GOTPAGEOFF]
Lloh47:
	adrp	x9, _PHY_INTERFACE_MODE_1000BASEX@GOTPAGE
Lloh48:
	ldr	x9, [x9, _PHY_INTERFACE_MODE_1000BASEX@GOTPAGEOFF]
	csel	x8, x8, x9, ne
	b	LBB0_18
LBB0_16:
Lloh49:
	adrp	x8, _PHY_INTERFACE_MODE_2500BASEX@GOTPAGE
Lloh50:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_2500BASEX@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh51:
	adrp	x8, _PHY_INTERFACE_MODE_SGMII@GOTPAGE
Lloh52:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_SGMII@GOTPAGEOFF]
LBB0_18:
	ldr	w6, [x8]
Lloh53:
	adrp	x8, _PAUSE_OFF@GOTPAGE
Lloh54:
	ldr	x8, [x8, _PAUSE_OFF@GOTPAGEOFF]
Lloh55:
	ldr	w5, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x23
	mov	x3, x24
	mov	x4, x22
	bl	_mv88e6xxx_port_setup_mac
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_23
; %bb.19:
	ldr	w8, [x20]
	str	x0, [sp]
Lloh56:
	adrp	x1, l_.str.2@PAGE
Lloh57:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_20:
	mov	x0, x8
LBB0_21:
	bl	_dev_err
LBB0_22:
	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_23:
	ldr	w8, [x25]
	cmp	w23, w8
	cset	w2, eq
	mov	x0, x21
	mov	x1, x19
	bl	_dsa_port_phylink_mac_change
	b	LBB0_22
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpAdd	Lloh56, Lloh57
	.cfi_endproc
                                        ; -- End function
	.comm	_DUPLEX_UNKNOWN,4,2             ; @DUPLEX_UNKNOWN
	.comm	_SPEED_UNKNOWN,4,2              ; @SPEED_UNKNOWN
	.comm	_MDIO_MMD_PHYXS,4,2             ; @MDIO_MMD_PHYXS
	.comm	_MV88E6390_SGMII_PHY_STATUS,4,2 ; @MV88E6390_SGMII_PHY_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't read SGMII PHY status: %d\n"

	.comm	_MV88E6390_SGMII_PHY_STATUS_LINK,4,2 ; @MV88E6390_SGMII_PHY_STATUS_LINK
	.comm	_LINK_FORCED_UP,4,2             ; @LINK_FORCED_UP
	.comm	_LINK_FORCED_DOWN,4,2           ; @LINK_FORCED_DOWN
	.comm	_MV88E6390_SGMII_PHY_STATUS_SPD_DPL_VALID,4,2 ; @MV88E6390_SGMII_PHY_STATUS_SPD_DPL_VALID
	.comm	_MV88E6390_SGMII_PHY_STATUS_DUPLEX_FULL,4,2 ; @MV88E6390_SGMII_PHY_STATUS_DUPLEX_FULL
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ; @DUPLEX_HALF
	.comm	_MV88E6390_SGMII_PHY_STATUS_SPEED_MASK,4,2 ; @MV88E6390_SGMII_PHY_STATUS_SPEED_MASK
	.comm	_SPEED_2500,4,2                 ; @SPEED_2500
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_SPEED_10,4,2                   ; @SPEED_10
l_.str.1:                               ; @.str.1
	.asciz	"invalid PHY speed\n"

	.comm	_PHY_INTERFACE_MODE_SGMII,4,2   ; @PHY_INTERFACE_MODE_SGMII
	.comm	_PHY_INTERFACE_MODE_1000BASEX,4,2 ; @PHY_INTERFACE_MODE_1000BASEX
	.comm	_PHY_INTERFACE_MODE_2500BASEX,4,2 ; @PHY_INTERFACE_MODE_2500BASEX
	.comm	_PHY_INTERFACE_MODE_NA,4,2      ; @PHY_INTERFACE_MODE_NA
	.comm	_PAUSE_OFF,4,2                  ; @PAUSE_OFF
l_.str.2:                               ; @.str.2
	.asciz	"can't propagate PHY settings to MAC: %d\n"

	.no_dead_strip	_mv88e6390_serdes_irq_link_sgmii
.subsections_via_symbols
