	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lan78xx_update_flowcontrol
_lan78xx_update_flowcontrol:            ## @lan78xx_update_flowcontrol
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	cmpq	$0, 16(%rdi)
	je	LBB0_2
## %bb.1:
	movl	%edx, %edi
	movl	%ecx, %esi
	callq	_mii_resolve_flowctrl_fdx
	movl	%eax, %ebx
	jmp	LBB0_3
LBB0_2:
	movl	(%r14), %ebx
LBB0_3:
	movq	_FLOW_CTRL_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	movq	_FLOW_CR_TX_FCEN_@GOTPCREL(%rip), %rcx
	movl	$65535, %edx                    ## imm = 0xFFFF
	orl	(%rcx), %edx
	movq	_FLOW_CTRL_RX@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	testl	%eax, %eax
	cmovel	%eax, %edx
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %r8
	movq	%r8, %r9
	cmoveq	%rax, %r9
	testl	%ebx, %ebx
	movq	_FLOW_CR_RX_FCEN_@GOTPCREL(%rip), %rcx
	cmovnel	(%rcx), %ebx
	movq	8(%r14), %rcx
	movq	(%rcx), %rcx
	movq	_USB_SPEED_HIGH@GOTPCREL(%rip), %rsi
	cmoveq	%rax, %r8
	orl	%edx, %ebx
	xorl	%eax, %eax
	cmpq	(%rsi), %rcx
	movq	_USB_SPEED_SUPER@GOTPCREL(%rip), %rdx
	movl	$529, %edi                      ## imm = 0x211
	cmovnel	%eax, %edi
	cmpq	(%rdx), %rcx
	movq	_link@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14), %edx
	movl	$2071, %r15d                    ## imm = 0x817
	cmovnel	%edi, %r15d
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	callq	_netif_dbg
	movq	_FCT_FLOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_lan78xx_write_reg
	movq	_FLOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_lan78xx_write_reg
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FLOW_CTRL_TX,4,2               ## @FLOW_CTRL_TX
	.comm	_FLOW_CR_TX_FCEN_,4,2           ## @FLOW_CR_TX_FCEN_
	.comm	_FLOW_CTRL_RX,4,2               ## @FLOW_CTRL_RX
	.comm	_FLOW_CR_RX_FCEN_,4,2           ## @FLOW_CR_RX_FCEN_
	.comm	_USB_SPEED_SUPER,8,3            ## @USB_SPEED_SUPER
	.comm	_USB_SPEED_HIGH,8,3             ## @USB_SPEED_HIGH
	.comm	_link,4,2                       ## @link
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rx pause %s, tx pause %s"

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

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

	.comm	_FCT_FLOW,4,2                   ## @FCT_FLOW
	.comm	_FLOW,4,2                       ## @FLOW
	.no_dead_strip	_lan78xx_update_flowcontrol
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lan78xx_update_flowcontrol
_lan78xx_update_flowcontrol:            ; @lan78xx_update_flowcontrol
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x2
	mov	x1, x3
	bl	_mii_resolve_flowctrl_fdx
	b	LBB0_3
LBB0_2:
	ldr	w0, [x19]
LBB0_3:
Lloh0:
	adrp	x8, _FLOW_CTRL_TX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FLOW_CTRL_TX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _FLOW_CR_TX_FCEN_@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FLOW_CR_TX_FCEN_@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w9, w9, #0xffff
Lloh6:
	adrp	x10, _FLOW_CTRL_RX@GOTPAGE
Lloh7:
	ldr	x10, [x10, _FLOW_CTRL_RX@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
Lloh9:
	adrp	x11, _FLOW_CR_RX_FCEN_@GOTPAGE
Lloh10:
	ldr	x11, [x11, _FLOW_CR_RX_FCEN_@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	ldr	x12, [x19, #8]
	ldr	x12, [x12]
Lloh12:
	adrp	x13, _USB_SPEED_SUPER@GOTPAGE
Lloh13:
	ldr	x13, [x13, _USB_SPEED_SUPER@GOTPAGEOFF]
Lloh14:
	ldr	x13, [x13]
Lloh15:
	adrp	x14, _USB_SPEED_HIGH@GOTPAGE
Lloh16:
	ldr	x14, [x14, _USB_SPEED_HIGH@GOTPAGEOFF]
Lloh17:
	ldr	x14, [x14]
	cmp	x12, x14
	mov	w14, #529
	csel	w14, w14, wzr, eq
	cmp	x12, x13
	mov	w12, #2071
	csel	w20, w12, w14, eq
	tst	w10, w0
Lloh18:
	adrp	x10, l_.str.1@PAGE
Lloh19:
	add	x10, x10, l_.str.1@PAGEOFF
	csel	w11, wzr, w11, eq
Lloh20:
	adrp	x12, l_.str.2@PAGE
Lloh21:
	add	x12, x12, l_.str.2@PAGEOFF
	csel	x4, x12, x10, eq
	tst	w8, w0
	csel	w8, wzr, w9, eq
	orr	w21, w11, w8
Lloh22:
	adrp	x8, _link@GOTPAGE
Lloh23:
	ldr	x8, [x8, _link@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	ldr	w2, [x19, #4]
	csel	x5, x12, x10, eq
Lloh25:
	adrp	x3, l_.str@PAGE
Lloh26:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_dbg
Lloh27:
	adrp	x8, _FCT_FLOW@GOTPAGE
Lloh28:
	ldr	x8, [x8, _FCT_FLOW@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_lan78xx_write_reg
Lloh30:
	adrp	x8, _FLOW@GOTPAGE
Lloh31:
	ldr	x8, [x8, _FLOW@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_lan78xx_write_reg
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_FLOW_CTRL_TX,4,2               ; @FLOW_CTRL_TX
	.comm	_FLOW_CR_TX_FCEN_,4,2           ; @FLOW_CR_TX_FCEN_
	.comm	_FLOW_CTRL_RX,4,2               ; @FLOW_CTRL_RX
	.comm	_FLOW_CR_RX_FCEN_,4,2           ; @FLOW_CR_RX_FCEN_
	.comm	_USB_SPEED_SUPER,8,3            ; @USB_SPEED_SUPER
	.comm	_USB_SPEED_HIGH,8,3             ; @USB_SPEED_HIGH
	.comm	_link,4,2                       ; @link
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rx pause %s, tx pause %s"

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

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

	.comm	_FCT_FLOW,4,2                   ; @FCT_FLOW
	.comm	_FLOW,4,2                       ; @FLOW
	.no_dead_strip	_lan78xx_update_flowcontrol
.subsections_via_symbols
