	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgbe_phy_phydev_flowctrl
_xgbe_phy_phydev_flowctrl:              ## @xgbe_phy_phydev_flowctrl
	.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
	movq	16(%rdi), %rbx
	movq	$0, (%rdi)
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rdi, %r13
	leaq	8(%rdi), %r15
	movl	16(%rax), %edi
	callq	_linkmode_adv_to_lcl_adv_t
	movl	%eax, %r14d
	movq	(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_2
## %bb.3:
	movq	_Pause@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_XGBE_SET_LP_ADV
	movq	_LPA_PAUSE_CAP@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
LBB0_5:
	movq	_Asym_Pause@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_XGBE_SET_LP_ADV
	movq	_LPA_PAUSE_ASYM@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
LBB0_6:
	movl	%r14d, %edi
	movl	%r12d, %esi
	callq	_mii_resolve_flowctrl_fdx
	movq	_FLOW_CTRL_TX@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.7:
	movl	$1, (%r13)
LBB0_8:
	movq	_FLOW_CTRL_RX@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.9:
	movl	$1, 4(%r13)
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	xorl	%r12d, %r12d
	cmpq	$0, (%rax)
	jne	LBB0_5
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_Pause,4,2                      ## @Pause
	.comm	_LPA_PAUSE_CAP,4,2              ## @LPA_PAUSE_CAP
	.comm	_Asym_Pause,4,2                 ## @Asym_Pause
	.comm	_LPA_PAUSE_ASYM,4,2             ## @LPA_PAUSE_ASYM
	.comm	_FLOW_CTRL_TX,4,2               ## @FLOW_CTRL_TX
	.comm	_FLOW_CTRL_RX,4,2               ## @FLOW_CTRL_RX
	.no_dead_strip	_xgbe_phy_phydev_flowctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgbe_phy_phydev_flowctrl
_xgbe_phy_phydev_flowctrl:              ; @xgbe_phy_phydev_flowctrl
	.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
	ldr	x23, [x0, #16]
	str	xzr, [x0]
	ldr	x8, [x23]
	cbz	x8, LBB0_8
; %bb.1:
	mov	x19, x0
	add	x21, x0, #8
	ldr	w0, [x8, #16]
	bl	_linkmode_adv_to_lcl_adv_t
	mov	x20, x0
	ldr	x8, [x23]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_9
; %bb.2:
Lloh0:
	adrp	x8, _Pause@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Pause@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_XGBE_SET_LP_ADV
Lloh3:
	adrp	x8, _LPA_PAUSE_CAP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LPA_PAUSE_CAP@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	ldr	x8, [x23]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
LBB0_3:
Lloh6:
	adrp	x8, _Asym_Pause@GOTPAGE
Lloh7:
	ldr	x8, [x8, _Asym_Pause@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_XGBE_SET_LP_ADV
Lloh9:
	adrp	x8, _LPA_PAUSE_ASYM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LPA_PAUSE_ASYM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	orr	w22, w8, w22
LBB0_4:
	mov	x0, x20
	mov	x1, x22
	bl	_mii_resolve_flowctrl_fdx
Lloh12:
	adrp	x8, _FLOW_CTRL_TX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FLOW_CTRL_TX@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.5:
	mov	w8, #1
	str	w8, [x19]
LBB0_6:
Lloh15:
	adrp	x8, _FLOW_CTRL_RX@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FLOW_CTRL_RX@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_8
; %bb.7:
	mov	w8, #1
	str	w8, [x19, #4]
LBB0_8:
	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_9:
	mov	w22, #0
	ldr	x8, [x8]
	cbnz	x8, LBB0_3
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_Pause,4,2                      ; @Pause
	.comm	_LPA_PAUSE_CAP,4,2              ; @LPA_PAUSE_CAP
	.comm	_Asym_Pause,4,2                 ; @Asym_Pause
	.comm	_LPA_PAUSE_ASYM,4,2             ; @LPA_PAUSE_ASYM
	.comm	_FLOW_CTRL_TX,4,2               ; @FLOW_CTRL_TX
	.comm	_FLOW_CTRL_RX,4,2               ; @FLOW_CTRL_RX
	.no_dead_strip	_xgbe_phy_phydev_flowctrl
.subsections_via_symbols
