	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mv88e6xxx_port_set_duplex      ## -- Begin function mv88e6xxx_port_set_duplex
	.p2align	4, 0x90
_mv88e6xxx_port_set_duplex:             ## @mv88e6xxx_port_set_duplex
	.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
	movl	%edx, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_MV88E6XXX_PORT_MAC_CTL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	leaq	-44(%rbp), %rcx
	callq	_mv88e6xxx_port_read
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	movq	_MV88E6XXX_PORT_MAC_CTL_FORCE_DUPLEX@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movq	_MV88E6XXX_PORT_MAC_CTL_DUPLEX_FULL@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edx
	orl	%eax, %edx
	movl	%edx, %ecx
	notl	%ecx
	movl	-44(%rbp), %esi
	andl	%esi, %ecx
	movl	%ecx, -44(%rbp)
	cmpl	$128, %ebx
	je	LBB0_2
## %bb.3:
	cmpl	$130, %ebx
	je	LBB0_7
## %bb.4:
	cmpl	$129, %ebx
	jne	LBB0_6
## %bb.5:
	movq	%rdi, %rbx
	orl	%eax, %ecx
	movl	%ecx, -44(%rbp)
	jmp	LBB0_8
LBB0_2:
	movq	%rdi, %rbx
	jmp	LBB0_8
LBB0_7:
	movq	%rdi, %rbx
	orl	%edx, %esi
	movl	%esi, -44(%rbp)
	movl	%esi, %ecx
LBB0_8:
	movl	(%r13), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_mv88e6xxx_port_write
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movl	(%r15), %edi
	movl	-44(%rbp), %eax
	movl	(%r12), %ecx
	andl	%eax, %ecx
	leaq	L_.str.2(%rip), %rdx
	leaq	L_.str.1(%rip), %rcx
	cmoveq	%rdx, %rcx
	andl	(%rbx), %eax
	leaq	L_.str.4(%rip), %rax
	leaq	L_.str.3(%rip), %r8
	cmoveq	%rax, %r8
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_dbg
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_6:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MV88E6XXX_PORT_MAC_CTL,4,2     ## @MV88E6XXX_PORT_MAC_CTL
	.comm	_MV88E6XXX_PORT_MAC_CTL_FORCE_DUPLEX,4,2 ## @MV88E6XXX_PORT_MAC_CTL_FORCE_DUPLEX
	.comm	_MV88E6XXX_PORT_MAC_CTL_DUPLEX_FULL,4,2 ## @MV88E6XXX_PORT_MAC_CTL_DUPLEX_FULL
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"p%d: %s %s duplex\n"

L_.str.1:                               ## @.str.1
	.asciz	"Force"

L_.str.2:                               ## @.str.2
	.asciz	"Unforce"

L_.str.3:                               ## @.str.3
	.asciz	"full"

L_.str.4:                               ## @.str.4
	.asciz	"half"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mv88e6xxx_port_set_duplex      ; -- Begin function mv88e6xxx_port_set_duplex
	.p2align	2
_mv88e6xxx_port_set_duplex:             ; @mv88e6xxx_port_set_duplex
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x24, _MV88E6XXX_PORT_MAC_CTL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MV88E6XXX_PORT_MAC_CTL@GOTPAGEOFF]
	ldr	w2, [x24]
	add	x3, sp, #12
	bl	_mv88e6xxx_port_read
	cbnz	w0, LBB0_10
; %bb.1:
Lloh2:
	adrp	x23, _MV88E6XXX_PORT_MAC_CTL_FORCE_DUPLEX@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MV88E6XXX_PORT_MAC_CTL_FORCE_DUPLEX@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh4:
	adrp	x22, _MV88E6XXX_PORT_MAC_CTL_DUPLEX_FULL@GOTPAGE
Lloh5:
	ldr	x22, [x22, _MV88E6XXX_PORT_MAC_CTL_DUPLEX_FULL@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w9, w9, w8
	ldr	w10, [sp, #12]
	bic	w3, w10, w9
	str	w3, [sp, #12]
	cmp	w21, #128
	b.eq	LBB0_7
; %bb.2:
	cmp	w21, #130
	b.eq	LBB0_5
; %bb.3:
	cmp	w21, #129
	b.ne	LBB0_9
; %bb.4:
	orr	w3, w3, w8
	b	LBB0_6
LBB0_5:
	orr	w3, w10, w9
LBB0_6:
	str	w3, [sp, #12]
LBB0_7:
	ldr	w2, [x24]
	mov	x0, x20
	mov	x1, x19
	bl	_mv88e6xxx_port_write
	cbnz	w0, LBB0_10
; %bb.8:
	ldr	w0, [x20]
	ldr	w8, [sp, #12]
Lloh6:
	adrp	x9, l_.str.1@PAGE
Lloh7:
	add	x9, x9, l_.str.1@PAGEOFF
	ldr	w10, [x23]
Lloh8:
	adrp	x11, l_.str.2@PAGE
Lloh9:
	add	x11, x11, l_.str.2@PAGEOFF
	tst	w10, w8
	csel	x3, x11, x9, eq
	ldr	w9, [x22]
Lloh10:
	adrp	x10, l_.str.3@PAGE
Lloh11:
	add	x10, x10, l_.str.3@PAGEOFF
Lloh12:
	adrp	x11, l_.str.4@PAGE
Lloh13:
	add	x11, x11, l_.str.4@PAGEOFF
	tst	w9, w8
	csel	x4, x11, x10, eq
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_dbg
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh16:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MV88E6XXX_PORT_MAC_CTL,4,2     ; @MV88E6XXX_PORT_MAC_CTL
	.comm	_MV88E6XXX_PORT_MAC_CTL_FORCE_DUPLEX,4,2 ; @MV88E6XXX_PORT_MAC_CTL_FORCE_DUPLEX
	.comm	_MV88E6XXX_PORT_MAC_CTL_DUPLEX_FULL,4,2 ; @MV88E6XXX_PORT_MAC_CTL_DUPLEX_FULL
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"p%d: %s %s duplex\n"

l_.str.1:                               ; @.str.1
	.asciz	"Force"

l_.str.2:                               ; @.str.2
	.asciz	"Unforce"

l_.str.3:                               ; @.str.3
	.asciz	"full"

l_.str.4:                               ; @.str.4
	.asciz	"half"

.subsections_via_symbols
