	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_setup_flow_control
_tg3_setup_flow_control:                ## @tg3_setup_flow_control
	.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, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	4(%rdi), %r12d
	movl	8(%rdi), %r13d
	movq	_USE_PHYLIB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_tg3_flag
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	40(%rbx), %esi
	movl	44(%rbx), %edi
	callq	_mdiobus_get_phy
	jmp	LBB0_3
LBB0_2:
	leaq	16(%rbx), %rax
LBB0_3:
	movq	(%rax), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.4:
	movq	_PAUSE_AUTONEG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_tg3_flag
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	_TG3_PHYFLG_ANY_SERDES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_7
## %bb.6:
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_tg3_resolve_flowctrl_1000X
	movq	%rax, %r14
	jmp	LBB0_9
LBB0_8:
	movq	24(%rbx), %r14
LBB0_9:
	movq	%r14, 32(%rbx)
	movq	_FLOW_CTRL_RX@GOTPCREL(%rip), %rax
	movq	_RX_MODE_FLOW_CTRL_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	testq	%r14, (%rax)
	je	LBB0_11
## %bb.10:
	orl	8(%rbx), %esi
	jmp	LBB0_12
LBB0_11:
	notl	%esi
	andl	8(%rbx), %esi
LBB0_12:
	movl	%esi, 8(%rbx)
	cmpl	%esi, %r13d
	je	LBB0_14
## %bb.13:
	movq	_MAC_RX_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_tw32_f
LBB0_14:
	movq	_FLOW_CTRL_TX@GOTPCREL(%rip), %rax
	movq	_TX_MODE_FLOW_CTRL_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	testq	%r14, (%rax)
	je	LBB0_16
## %bb.15:
	orl	4(%rbx), %esi
	jmp	LBB0_17
LBB0_16:
	notl	%esi
	andl	4(%rbx), %esi
LBB0_17:
	movl	%esi, 4(%rbx)
	cmpl	%esi, %r12d
	jne	LBB0_19
## %bb.18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	_MAC_TX_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tw32_f                         ## TAILCALL
LBB0_7:
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_mii_resolve_flowctrl_fdx
	movq	%rax, %r14
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_USE_PHYLIB,4,2                 ## @USE_PHYLIB
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_PAUSE_AUTONEG,4,2              ## @PAUSE_AUTONEG
	.comm	_TG3_PHYFLG_ANY_SERDES,4,2      ## @TG3_PHYFLG_ANY_SERDES
	.comm	_FLOW_CTRL_RX,8,3               ## @FLOW_CTRL_RX
	.comm	_RX_MODE_FLOW_CTRL_ENABLE,4,2   ## @RX_MODE_FLOW_CTRL_ENABLE
	.comm	_MAC_RX_MODE,4,2                ## @MAC_RX_MODE
	.comm	_FLOW_CTRL_TX,8,3               ## @FLOW_CTRL_TX
	.comm	_TX_MODE_FLOW_CTRL_ENABLE,4,2   ## @TX_MODE_FLOW_CTRL_ENABLE
	.comm	_MAC_TX_MODE,4,2                ## @MAC_TX_MODE
	.no_dead_strip	_tg3_setup_flow_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tg3_setup_flow_control
_tg3_setup_flow_control:                ; @tg3_setup_flow_control
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldp	w22, w23, [x0, #4]
Lloh0:
	adrp	x8, _USE_PHYLIB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _USE_PHYLIB@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_tg3_flag
	cbz	x0, LBB0_2
; %bb.1:
	ldp	w1, w0, [x19, #40]
	bl	_mdiobus_get_phy
	b	LBB0_3
LBB0_2:
	add	x0, x19, #16
LBB0_3:
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.4:
Lloh6:
	adrp	x8, _PAUSE_AUTONEG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PAUSE_AUTONEG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tg3_flag
	cbz	x0, LBB0_7
; %bb.5:
	ldr	w8, [x19]
Lloh9:
	adrp	x9, _TG3_PHYFLG_ANY_SERDES@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TG3_PHYFLG_ANY_SERDES@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	mov	x0, x21
	mov	x1, x20
	tst	w9, w8
	b.eq	LBB0_19
; %bb.6:
	bl	_tg3_resolve_flowctrl_1000X
	mov	x20, x0
	b	LBB0_8
LBB0_7:
	ldr	x20, [x19, #24]
LBB0_8:
Lloh12:
	adrp	x8, _FLOW_CTRL_RX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FLOW_CTRL_RX@GOTPAGEOFF]
	str	x20, [x19, #32]
Lloh14:
	ldr	x9, [x8]
Lloh15:
	adrp	x8, _RX_MODE_FLOW_CTRL_ENABLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RX_MODE_FLOW_CTRL_ENABLE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	x9, x20
	b.eq	LBB0_10
; %bb.9:
	ldr	w9, [x19, #8]
	orr	w1, w9, w8
	b	LBB0_11
LBB0_10:
	ldr	w9, [x19, #8]
	bic	w1, w9, w8
LBB0_11:
	str	w1, [x19, #8]
	cmp	w23, w1
	b.eq	LBB0_13
; %bb.12:
Lloh18:
	adrp	x8, _MAC_RX_MODE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MAC_RX_MODE@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_tw32_f
LBB0_13:
Lloh21:
	adrp	x8, _FLOW_CTRL_TX@GOTPAGE
Lloh22:
	ldr	x8, [x8, _FLOW_CTRL_TX@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x8]
Lloh24:
	adrp	x8, _TX_MODE_FLOW_CTRL_ENABLE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _TX_MODE_FLOW_CTRL_ENABLE@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	tst	x9, x20
	b.eq	LBB0_15
; %bb.14:
	ldr	w9, [x19, #4]
	orr	w1, w9, w8
	b	LBB0_16
LBB0_15:
	ldr	w9, [x19, #4]
	bic	w1, w9, w8
LBB0_16:
	str	w1, [x19, #4]
	cmp	w22, w1
	b.ne	LBB0_18
; %bb.17:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_18:
Lloh27:
	adrp	x8, _MAC_TX_MODE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MAC_TX_MODE@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_tw32_f
LBB0_19:
	bl	_mii_resolve_flowctrl_fdx
	mov	x20, x0
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_USE_PHYLIB,4,2                 ; @USE_PHYLIB
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_PAUSE_AUTONEG,4,2              ; @PAUSE_AUTONEG
	.comm	_TG3_PHYFLG_ANY_SERDES,4,2      ; @TG3_PHYFLG_ANY_SERDES
	.comm	_FLOW_CTRL_RX,8,3               ; @FLOW_CTRL_RX
	.comm	_RX_MODE_FLOW_CTRL_ENABLE,4,2   ; @RX_MODE_FLOW_CTRL_ENABLE
	.comm	_MAC_RX_MODE,4,2                ; @MAC_RX_MODE
	.comm	_FLOW_CTRL_TX,8,3               ; @FLOW_CTRL_TX
	.comm	_TX_MODE_FLOW_CTRL_ENABLE,4,2   ; @TX_MODE_FLOW_CTRL_ENABLE
	.comm	_MAC_TX_MODE,4,2                ; @MAC_TX_MODE
	.no_dead_strip	_tg3_setup_flow_control
.subsections_via_symbols
