	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pm3393_set_speed_duplex_fc
_pm3393_set_speed_duplex_fc:            ## @pm3393_set_speed_duplex_fc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	$-1, %ebx
	testl	%esi, %esi
	js	LBB0_2
## %bb.1:
	movq	_SPEED_10000@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_8
LBB0_2:
	testl	%edx, %edx
	js	LBB0_4
## %bb.3:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jne	LBB0_8
LBB0_4:
	movq	_PAUSE_TX@GOTPCREL(%rip), %rax
	movq	_PAUSE_RX@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rax), %edx
	notl	%edx
	testl	%ecx, %edx
	jne	LBB0_8
## %bb.5:
	movq	(%rdi), %rax
	xorl	%ebx, %ebx
	cmpl	%ecx, (%rax)
	je	LBB0_8
## %bb.6:
	movl	%ecx, (%rax)
	movq	_MAC_DIRECTION_TX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	testl	%esi, 4(%rax)
	je	LBB0_8
## %bb.7:
	callq	_pm3393_enable
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPEED_10000,4,2                ## @SPEED_10000
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_PAUSE_TX,4,2                   ## @PAUSE_TX
	.comm	_PAUSE_RX,4,2                   ## @PAUSE_RX
	.comm	_MAC_DIRECTION_TX,4,2           ## @MAC_DIRECTION_TX
	.no_dead_strip	_pm3393_set_speed_duplex_fc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pm3393_set_speed_duplex_fc
_pm3393_set_speed_duplex_fc:            ; @pm3393_set_speed_duplex_fc
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	tbnz	w1, #31, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _SPEED_10000@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPEED_10000@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_5
LBB0_2:
	tbnz	w2, #31, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _DUPLEX_FULL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DUPLEX_FULL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ne	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _PAUSE_TX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PAUSE_TX@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _PAUSE_RX@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PAUSE_RX@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bics	wzr, w3, w8
	b.eq	LBB0_6
LBB0_5:
	mov	w0, #-1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	x8, [x0]
	ldr	w9, [x8]
	cmp	w9, w3
	b.eq	LBB0_9
; %bb.7:
	str	w3, [x8]
	ldr	w8, [x8, #4]
Lloh12:
	adrp	x9, _MAC_DIRECTION_TX@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MAC_DIRECTION_TX@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x9]
	tst	w1, w8
	b.eq	LBB0_9
; %bb.8:
	bl	_pm3393_enable
LBB0_9:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SPEED_10000,4,2                ; @SPEED_10000
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_PAUSE_TX,4,2                   ; @PAUSE_TX
	.comm	_PAUSE_RX,4,2                   ; @PAUSE_RX
	.comm	_MAC_DIRECTION_TX,4,2           ; @MAC_DIRECTION_TX
	.no_dead_strip	_pm3393_set_speed_duplex_fc
.subsections_via_symbols
