	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv88e6xxx_port_set_cmode
_mv88e6xxx_port_set_cmode:              ## @mv88e6xxx_port_set_cmode
	.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	_PHY_INTERFACE_MODE_NA@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	$133, %ecx
	cmovnel	%edx, %ecx
	xorl	%eax, %eax
	addl	$-128, %ecx
	movl	$0, %r13d
	cmpl	$5, %ecx
	ja	LBB0_8
## %bb.1:
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_5:
	movq	_MV88E6XXX_PORT_STS_CMODE_XAUI@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_3:
	movq	_MV88E6XXX_PORT_STS_CMODE_SGMII@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_6:
	movq	_MV88E6XXX_PORT_STS_CMODE_RXAUI@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_4:
	movq	_MV88E6XXX_PORT_STS_CMODE_2500BASEX@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_2:
	movq	_MV88E6XXX_PORT_STS_CMODE_1000BASEX@GOTPCREL(%rip), %rcx
LBB0_7:
	movl	(%rcx), %r13d
LBB0_8:
	movq	(%r15), %rcx
	movslq	%r14d, %rbx
	shlq	$4, %rbx
	cmpl	(%rcx,%rbx), %r13d
	jne	LBB0_9
LBB0_22:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_mv88e6xxx_serdes_get_lane
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movq	%rax, %r12
	movq	(%r15), %rax
	cmpq	$0, 8(%rax,%rbx)
	je	LBB0_12
## %bb.11:
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	callq	_mv88e6xxx_serdes_irq_disable
	testl	%eax, %eax
	jne	LBB0_22
LBB0_12:
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	callq	_mv88e6xxx_serdes_power_down
	testl	%eax, %eax
	jne	LBB0_22
LBB0_13:
	movq	(%r15), %rax
	movl	$0, (%rax,%rbx)
	testl	%r13d, %r13d
	je	LBB0_21
## %bb.14:
	movq	_MV88E6XXX_PORT_STS@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	-44(%rbp), %rcx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_mv88e6xxx_port_read
	testl	%eax, %eax
	jne	LBB0_22
## %bb.15:
	movq	_MV88E6XXX_PORT_STS_CMODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	notl	%ecx
	andl	-44(%rbp), %ecx
	orl	%r13d, %ecx
	movl	%ecx, -44(%rbp)
	movl	(%r12), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_mv88e6xxx_port_write
	testl	%eax, %eax
	jne	LBB0_22
## %bb.16:
	movq	(%r15), %rax
	movl	%r13d, (%rax,%rbx)
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_mv88e6xxx_serdes_get_lane
	testq	%rax, %rax
	je	LBB0_17
## %bb.18:
	movq	%rax, %r12
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rax, %rdx
	callq	_mv88e6xxx_serdes_power_up
	testl	%eax, %eax
	jne	LBB0_22
## %bb.19:
	movq	(%r15), %rax
	cmpq	$0, 8(%rax,%rbx)
	je	LBB0_21
## %bb.20:
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	callq	_mv88e6xxx_serdes_irq_enable
	testl	%eax, %eax
	jne	LBB0_22
LBB0_21:
	xorl	%eax, %eax
	jmp	LBB0_22
LBB0_17:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_22
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_3
	.long	L0_0_set_6
	.long	L0_0_set_4
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_PHY_INTERFACE_MODE_NA,4,2      ## @PHY_INTERFACE_MODE_NA
	.comm	_MV88E6XXX_PORT_STS_CMODE_1000BASEX,4,2 ## @MV88E6XXX_PORT_STS_CMODE_1000BASEX
	.comm	_MV88E6XXX_PORT_STS_CMODE_SGMII,4,2 ## @MV88E6XXX_PORT_STS_CMODE_SGMII
	.comm	_MV88E6XXX_PORT_STS_CMODE_2500BASEX,4,2 ## @MV88E6XXX_PORT_STS_CMODE_2500BASEX
	.comm	_MV88E6XXX_PORT_STS_CMODE_XAUI,4,2 ## @MV88E6XXX_PORT_STS_CMODE_XAUI
	.comm	_MV88E6XXX_PORT_STS_CMODE_RXAUI,4,2 ## @MV88E6XXX_PORT_STS_CMODE_RXAUI
	.comm	_MV88E6XXX_PORT_STS,4,2         ## @MV88E6XXX_PORT_STS
	.comm	_MV88E6XXX_PORT_STS_CMODE_MASK,4,2 ## @MV88E6XXX_PORT_STS_CMODE_MASK
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_mv88e6xxx_port_set_cmode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv88e6xxx_port_set_cmode
_mv88e6xxx_port_set_cmode:              ; @mv88e6xxx_port_set_cmode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _PHY_INTERFACE_MODE_NA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHY_INTERFACE_MODE_NA@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #133
	cmp	w8, w2
	csel	w8, w9, w2, eq
	sub	w8, w8, #128
	cmp	w8, #5
	b.hi	LBB0_3
; %bb.1:
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh5:
	adrp	x8, _MV88E6XXX_PORT_STS_CMODE_XAUI@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MV88E6XXX_PORT_STS_CMODE_XAUI@GOTPAGEOFF]
	b	LBB0_8
LBB0_3:
	mov	w22, #0
	b	LBB0_9
LBB0_4:
Lloh7:
	adrp	x8, _MV88E6XXX_PORT_STS_CMODE_SGMII@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MV88E6XXX_PORT_STS_CMODE_SGMII@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
Lloh9:
	adrp	x8, _MV88E6XXX_PORT_STS_CMODE_RXAUI@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MV88E6XXX_PORT_STS_CMODE_RXAUI@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh11:
	adrp	x8, _MV88E6XXX_PORT_STS_CMODE_2500BASEX@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MV88E6XXX_PORT_STS_CMODE_2500BASEX@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh13:
	adrp	x8, _MV88E6XXX_PORT_STS_CMODE_1000BASEX@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MV88E6XXX_PORT_STS_CMODE_1000BASEX@GOTPAGEOFF]
LBB0_8:
	ldr	w22, [x8]
LBB0_9:
	ldr	x8, [x20]
	sbfiz	x9, x19, #4, #32
	ldr	w8, [x8, x9]
	cmp	w22, w8
	b.ne	LBB0_12
LBB0_10:
	mov	w0, #0
LBB0_11:
	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
	add	sp, sp, #80
	ret
LBB0_12:
	sxtw	x23, w19
	mov	x0, x20
	mov	x1, x19
	bl	_mv88e6xxx_serdes_get_lane
	cbz	x0, LBB0_16
; %bb.13:
	mov	x21, x0
	ldr	x8, [x20]
	add	x8, x8, x23, lsl #4
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_15
; %bb.14:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_mv88e6xxx_serdes_irq_disable
	cbnz	w0, LBB0_11
LBB0_15:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_mv88e6xxx_serdes_power_down
	cbnz	w0, LBB0_11
LBB0_16:
	ldr	x8, [x20]
	lsl	x21, x23, #4
	str	wzr, [x8, x21]
	cbz	w22, LBB0_10
; %bb.17:
Lloh15:
	adrp	x24, _MV88E6XXX_PORT_STS@GOTPAGE
Lloh16:
	ldr	x24, [x24, _MV88E6XXX_PORT_STS@GOTPAGEOFF]
	ldr	w2, [x24]
	add	x3, sp, #12
	mov	x0, x20
	mov	x1, x19
	bl	_mv88e6xxx_port_read
	cbnz	w0, LBB0_11
; %bb.18:
Lloh17:
	adrp	x8, _MV88E6XXX_PORT_STS_CMODE_MASK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MV88E6XXX_PORT_STS_CMODE_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
	orr	w3, w8, w22
	str	w3, [sp, #12]
	ldr	w2, [x24]
	mov	x0, x20
	mov	x1, x19
	bl	_mv88e6xxx_port_write
	cbnz	w0, LBB0_11
; %bb.19:
	ldr	x8, [x20]
	str	w22, [x8, x21]
	mov	x0, x20
	mov	x1, x19
	bl	_mv88e6xxx_serdes_get_lane
	cbz	x0, LBB0_23
; %bb.20:
	mov	x21, x0
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_mv88e6xxx_serdes_power_up
	cbnz	w0, LBB0_11
; %bb.21:
	ldr	x8, [x20]
	add	x8, x8, x23, lsl #4
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_10
; %bb.22:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_mv88e6xxx_serdes_irq_enable
	cbnz	w0, LBB0_11
	b	LBB0_10
LBB0_23:
Lloh20:
	adrp	x8, _ENODEV@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
                                        ; -- End function
	.comm	_PHY_INTERFACE_MODE_NA,4,2      ; @PHY_INTERFACE_MODE_NA
	.comm	_MV88E6XXX_PORT_STS_CMODE_1000BASEX,4,2 ; @MV88E6XXX_PORT_STS_CMODE_1000BASEX
	.comm	_MV88E6XXX_PORT_STS_CMODE_SGMII,4,2 ; @MV88E6XXX_PORT_STS_CMODE_SGMII
	.comm	_MV88E6XXX_PORT_STS_CMODE_2500BASEX,4,2 ; @MV88E6XXX_PORT_STS_CMODE_2500BASEX
	.comm	_MV88E6XXX_PORT_STS_CMODE_XAUI,4,2 ; @MV88E6XXX_PORT_STS_CMODE_XAUI
	.comm	_MV88E6XXX_PORT_STS_CMODE_RXAUI,4,2 ; @MV88E6XXX_PORT_STS_CMODE_RXAUI
	.comm	_MV88E6XXX_PORT_STS,4,2         ; @MV88E6XXX_PORT_STS
	.comm	_MV88E6XXX_PORT_STS_CMODE_MASK,4,2 ; @MV88E6XXX_PORT_STS_CMODE_MASK
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_mv88e6xxx_port_set_cmode
.subsections_via_symbols
