	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv88e6xxx_port_set_speed
_mv88e6xxx_port_set_speed:              ## @mv88e6xxx_port_set_speed
	.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	%edx, %ebx
	cmpl	$199, %edx
	jle	LBB0_1
## %bb.5:
	cmpl	$2499, %ebx                     ## imm = 0x9C3
	jg	LBB0_9
## %bb.6:
	cmpl	$200, %ebx
	je	LBB0_14
## %bb.7:
	cmpl	$1000, %ebx                     ## imm = 0x3E8
	jne	LBB0_4
## %bb.8:
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movq	_MV88E6XXX_PORT_MAC_CTL_SPEED_1000@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_1:
	cmpl	$10, %ebx
	je	LBB0_12
## %bb.2:
	cmpl	$100, %ebx
	je	LBB0_13
## %bb.3:
	cmpl	$128, %ebx
	je	LBB0_11
LBB0_4:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_27
LBB0_9:
	cmpl	$2500, %ebx                     ## imm = 0x9C4
	je	LBB0_18
## %bb.10:
	cmpl	$10000, %ebx                    ## imm = 0x2710
	jne	LBB0_4
LBB0_11:
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movq	_MV88E6XXX_PORT_MAC_CTL_SPEED_UNFORCED@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_14:
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	testl	%ecx, %ecx
	je	LBB0_16
## %bb.15:
	movq	_MV88E6XXX_PORT_MAC_CTL_SPEED_100@GOTPCREL(%rip), %rax
	movq	_MV88E6390_PORT_MAC_CTL_ALTSPEED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_21
LBB0_12:
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movq	_MV88E6XXX_PORT_MAC_CTL_SPEED_10@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_13:
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movq	_MV88E6XXX_PORT_MAC_CTL_SPEED_100@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_18:
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movq	_MV88E6390_PORT_MAC_CTL_SPEED_10000@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	testl	%ecx, %ecx
	je	LBB0_20
## %bb.19:
	movq	_MV88E6390_PORT_MAC_CTL_ALTSPEED@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
LBB0_20:
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_21
LBB0_16:
	movq	_MV88E6065_PORT_MAC_CTL_SPEED_200@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_21:
	movq	_MV88E6XXX_PORT_MAC_CTL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	leaq	-56(%rbp), %rcx
	movl	%esi, %r14d
	movq	%rdi, %r13
	callq	_mv88e6xxx_port_read
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_27
## %bb.22:
	movq	_MV88E6XXX_PORT_MAC_CTL_SPEED_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-56(%rbp), %edx
	movq	_MV88E6390_PORT_MAC_CTL_ALTSPEED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%eax, %eax
	cmpl	$1, -48(%rbp)                   ## 4-byte Folded Reload
	movl	$0, %ecx
	sbbl	%ecx, %ecx
	notl	%esi
	orl	%esi, %ecx
	andl	%edx, %ecx
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_23
## %bb.24:
	movq	_MV88E6390_PORT_MAC_CTL_FORCE_SPEED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, %esi
	notl	%esi
	andl	%esi, %ecx
	cmpl	$128, %ebx
	cmovnel	%edx, %eax
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	orl	%eax, %edx
	jmp	LBB0_25
LBB0_23:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
LBB0_25:
	orl	%edx, %ecx
	movl	%ecx, -56(%rbp)
	movl	(%r15), %edx
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_mv88e6xxx_port_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_27
## %bb.26:
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	movl	%r14d, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_27:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MV88E6XXX_PORT_MAC_CTL_SPEED_10,4,2 ## @MV88E6XXX_PORT_MAC_CTL_SPEED_10
	.comm	_MV88E6XXX_PORT_MAC_CTL_SPEED_100,4,2 ## @MV88E6XXX_PORT_MAC_CTL_SPEED_100
	.comm	_MV88E6390_PORT_MAC_CTL_ALTSPEED,4,2 ## @MV88E6390_PORT_MAC_CTL_ALTSPEED
	.comm	_MV88E6065_PORT_MAC_CTL_SPEED_200,4,2 ## @MV88E6065_PORT_MAC_CTL_SPEED_200
	.comm	_MV88E6XXX_PORT_MAC_CTL_SPEED_1000,4,2 ## @MV88E6XXX_PORT_MAC_CTL_SPEED_1000
	.comm	_MV88E6390_PORT_MAC_CTL_SPEED_10000,4,2 ## @MV88E6390_PORT_MAC_CTL_SPEED_10000
	.comm	_MV88E6XXX_PORT_MAC_CTL_SPEED_UNFORCED,4,2 ## @MV88E6XXX_PORT_MAC_CTL_SPEED_UNFORCED
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_MV88E6XXX_PORT_MAC_CTL,4,2     ## @MV88E6XXX_PORT_MAC_CTL
	.comm	_MV88E6XXX_PORT_MAC_CTL_SPEED_MASK,4,2 ## @MV88E6XXX_PORT_MAC_CTL_SPEED_MASK
	.comm	_MV88E6390_PORT_MAC_CTL_FORCE_SPEED,4,2 ## @MV88E6390_PORT_MAC_CTL_FORCE_SPEED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"p%d: Speed set to %d Mbps\n"

	.no_dead_strip	_mv88e6xxx_port_set_speed
.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_speed
_mv88e6xxx_port_set_speed:              ; @mv88e6xxx_port_set_speed
	.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	x22, x4
	mov	x23, x3
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	cmp	w2, #199
	b.le	LBB0_5
; %bb.1:
	cmp	w20, #2499
	b.gt	LBB0_9
; %bb.2:
	cmp	w20, #200
	b.eq	LBB0_12
; %bb.3:
	cmp	w20, #1000
	b.ne	LBB0_8
; %bb.4:
Lloh0:
	adrp	x8, _MV88E6XXX_PORT_MAC_CTL_SPEED_1000@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MV88E6XXX_PORT_MAC_CTL_SPEED_1000@GOTPAGEOFF]
	b	LBB0_19
LBB0_5:
	cmp	w20, #10
	b.eq	LBB0_14
; %bb.6:
	cmp	w20, #100
	b.eq	LBB0_15
; %bb.7:
	cmp	w20, #128
	b.eq	LBB0_11
LBB0_8:
Lloh2:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_25
LBB0_9:
	cmp	w20, #2500
	b.eq	LBB0_16
; %bb.10:
	mov	w8, #10000
	cmp	w20, w8
	b.ne	LBB0_8
LBB0_11:
Lloh5:
	adrp	x8, _MV88E6XXX_PORT_MAC_CTL_SPEED_UNFORCED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MV88E6XXX_PORT_MAC_CTL_SPEED_UNFORCED@GOTPAGEOFF]
	b	LBB0_19
LBB0_12:
	cbz	w23, LBB0_18
; %bb.13:
Lloh7:
	adrp	x8, _MV88E6XXX_PORT_MAC_CTL_SPEED_100@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MV88E6XXX_PORT_MAC_CTL_SPEED_100@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _MV88E6390_PORT_MAC_CTL_ALTSPEED@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MV88E6390_PORT_MAC_CTL_ALTSPEED@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w24, w9, w8
	b	LBB0_20
LBB0_14:
Lloh13:
	adrp	x8, _MV88E6XXX_PORT_MAC_CTL_SPEED_10@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MV88E6XXX_PORT_MAC_CTL_SPEED_10@GOTPAGEOFF]
	b	LBB0_19
LBB0_15:
Lloh15:
	adrp	x8, _MV88E6XXX_PORT_MAC_CTL_SPEED_100@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MV88E6XXX_PORT_MAC_CTL_SPEED_100@GOTPAGEOFF]
	b	LBB0_19
LBB0_16:
Lloh17:
	adrp	x8, _MV88E6390_PORT_MAC_CTL_SPEED_10000@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MV88E6390_PORT_MAC_CTL_SPEED_10000@GOTPAGEOFF]
Lloh19:
	ldr	w24, [x8]
	cbz	w23, LBB0_20
; %bb.17:
Lloh20:
	adrp	x8, _MV88E6390_PORT_MAC_CTL_ALTSPEED@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MV88E6390_PORT_MAC_CTL_ALTSPEED@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	orr	w24, w8, w24
	b	LBB0_20
LBB0_18:
Lloh23:
	adrp	x8, _MV88E6065_PORT_MAC_CTL_SPEED_200@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MV88E6065_PORT_MAC_CTL_SPEED_200@GOTPAGEOFF]
LBB0_19:
	ldr	w24, [x8]
LBB0_20:
Lloh25:
	adrp	x25, _MV88E6XXX_PORT_MAC_CTL@GOTPAGE
Lloh26:
	ldr	x25, [x25, _MV88E6XXX_PORT_MAC_CTL@GOTPAGEOFF]
	ldr	w2, [x25]
	add	x3, sp, #12
	mov	x0, x21
	mov	x1, x19
	bl	_mv88e6xxx_port_read
	cbnz	w0, LBB0_25
; %bb.21:
Lloh27:
	adrp	x8, _MV88E6XXX_PORT_MAC_CTL_SPEED_MASK@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MV88E6XXX_PORT_MAC_CTL_SPEED_MASK@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
Lloh30:
	adrp	x10, _MV88E6390_PORT_MAC_CTL_ALTSPEED@GOTPAGE
Lloh31:
	ldr	x10, [x10, _MV88E6390_PORT_MAC_CTL_ALTSPEED@GOTPAGEOFF]
	bic	w8, w9, w8
Lloh32:
	ldr	w9, [x10]
	cmp	w23, #0
	mov	w10, #-1
	csinv	w9, w10, w9, eq
	and	w8, w8, w9
	cbz	w22, LBB0_23
; %bb.22:
Lloh33:
	adrp	x9, _MV88E6390_PORT_MAC_CTL_FORCE_SPEED@GOTPAGE
Lloh34:
	ldr	x9, [x9, _MV88E6390_PORT_MAC_CTL_FORCE_SPEED@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	bic	w8, w8, w9
	cmp	w20, #128
	csel	w9, wzr, w9, eq
	orr	w24, w9, w24
LBB0_23:
	orr	w3, w8, w24
	str	w3, [sp, #12]
	ldr	w2, [x25]
	mov	x0, x21
	mov	x1, x19
	bl	_mv88e6xxx_port_write
	cbnz	w0, LBB0_25
; %bb.24:
	ldr	w0, [x21]
	str	x20, [sp]
Lloh36:
	adrp	x1, l_.str@PAGE
Lloh37:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_dbg
	mov	w0, #0
LBB0_25:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_MV88E6XXX_PORT_MAC_CTL_SPEED_10,4,2 ; @MV88E6XXX_PORT_MAC_CTL_SPEED_10
	.comm	_MV88E6XXX_PORT_MAC_CTL_SPEED_100,4,2 ; @MV88E6XXX_PORT_MAC_CTL_SPEED_100
	.comm	_MV88E6390_PORT_MAC_CTL_ALTSPEED,4,2 ; @MV88E6390_PORT_MAC_CTL_ALTSPEED
	.comm	_MV88E6065_PORT_MAC_CTL_SPEED_200,4,2 ; @MV88E6065_PORT_MAC_CTL_SPEED_200
	.comm	_MV88E6XXX_PORT_MAC_CTL_SPEED_1000,4,2 ; @MV88E6XXX_PORT_MAC_CTL_SPEED_1000
	.comm	_MV88E6390_PORT_MAC_CTL_SPEED_10000,4,2 ; @MV88E6390_PORT_MAC_CTL_SPEED_10000
	.comm	_MV88E6XXX_PORT_MAC_CTL_SPEED_UNFORCED,4,2 ; @MV88E6XXX_PORT_MAC_CTL_SPEED_UNFORCED
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_MV88E6XXX_PORT_MAC_CTL,4,2     ; @MV88E6XXX_PORT_MAC_CTL
	.comm	_MV88E6XXX_PORT_MAC_CTL_SPEED_MASK,4,2 ; @MV88E6XXX_PORT_MAC_CTL_SPEED_MASK
	.comm	_MV88E6390_PORT_MAC_CTL_FORCE_SPEED,4,2 ; @MV88E6390_PORT_MAC_CTL_FORCE_SPEED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"p%d: Speed set to %d Mbps\n"

	.no_dead_strip	_mv88e6xxx_port_set_speed
.subsections_via_symbols
