	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgene_enet_flowctrl_cfg
_xgene_enet_flowctrl_cfg:               ## @xgene_enet_flowctrl_cfg
	.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	%rdi, %rbx
	callq	_netdev_priv
	movq	(%rbx), %rbx
	cmpl	$0, 16(%rbx)
	je	LBB0_14
## %bb.1:
	movq	%rax, %r12
	cmpl	$0, 16(%rax)
	je	LBB0_14
## %bb.2:
	movl	(%r12), %eax
	movl	4(%r12), %edi
	movq	_FLOW_CTRL_TX@GOTPCREL(%rip), %r15
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	(%r15), %eax
LBB0_4:
	movq	_FLOW_CTRL_RX@GOTPCREL(%rip), %r13
	testl	%edi, %edi
	je	LBB0_6
## %bb.5:
	movl	(%r13), %edi
LBB0_6:
	orl	%eax, %edi
	callq	_mii_advertise_flowctrl
	xorl	%esi, %esi
	cmpq	$0, 8(%rbx)
	movl	$0, %ecx
	je	LBB0_8
## %bb.7:
	movq	_LPA_PAUSE_CAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_8:
	cmpq	$0, (%rbx)
	je	LBB0_10
## %bb.9:
	movq	_LPA_PAUSE_ASYM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
LBB0_10:
	orl	%ecx, %esi
	movl	%eax, %edi
	callq	_mii_resolve_flowctrl_fdx
	movl	%eax, %r14d
	movl	(%r15), %eax
	xorl	%esi, %esi
	testl	%r14d, %eax
	setne	%sil
	movl	(%r13), %ebx
	xorl	%r15d, %r15d
	testl	%r14d, %ebx
	setne	%r15b
	movslq	(%r12), %rcx
	cmpq	%rcx, %rsi
	je	LBB0_12
## %bb.11:
	xorl	%ecx, %ecx
	testl	%r14d, %eax
	setne	%cl
	movl	%ecx, (%r12)
	movq	8(%r12), %rax
	movq	%r12, %rdi
	callq	*8(%rax)
LBB0_12:
	movslq	4(%r12), %rax
	cmpq	%rax, %r15
	je	LBB0_14
## %bb.13:
	xorl	%eax, %eax
	testl	%r14d, %ebx
	setne	%al
	movl	%eax, 4(%r12)
	movq	8(%r12), %rax
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	*(%rax)
LBB0_14:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FLOW_CTRL_TX,4,2               ## @FLOW_CTRL_TX
	.comm	_FLOW_CTRL_RX,4,2               ## @FLOW_CTRL_RX
	.comm	_LPA_PAUSE_CAP,4,2              ## @LPA_PAUSE_CAP
	.comm	_LPA_PAUSE_ASYM,4,2             ## @LPA_PAUSE_ASYM
	.no_dead_strip	_xgene_enet_flowctrl_cfg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgene_enet_flowctrl_cfg
_xgene_enet_flowctrl_cfg:               ; @xgene_enet_flowctrl_cfg
	.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	x20, x0
	bl	_netdev_priv
	ldr	x20, [x20]
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0, #16]
	cbz	w8, LBB0_6
; %bb.2:
Lloh0:
	adrp	x21, _FLOW_CTRL_TX@GOTPAGE
Lloh1:
	ldr	x21, [x21, _FLOW_CTRL_TX@GOTPAGEOFF]
	ldr	w8, [x21]
	ldp	w9, w10, [x19]
	cmp	w9, #0
	csel	w8, wzr, w8, eq
Lloh2:
	adrp	x22, _FLOW_CTRL_RX@GOTPAGE
Lloh3:
	ldr	x22, [x22, _FLOW_CTRL_RX@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w10, #0
	csel	w9, wzr, w9, eq
	orr	w0, w9, w8
	bl	_mii_advertise_flowctrl
Lloh4:
	adrp	x8, _LPA_PAUSE_CAP@GOTPAGE
Lloh5:
	ldr	x8, [x8, _LPA_PAUSE_CAP@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldp	x10, x9, [x20]
	cmp	x9, #0
	csel	w8, wzr, w8, eq
Lloh7:
	adrp	x9, _LPA_PAUSE_ASYM@GOTPAGE
Lloh8:
	ldr	x9, [x9, _LPA_PAUSE_ASYM@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	cmp	x10, #0
	csel	w9, wzr, w9, eq
	orr	w1, w9, w8
	bl	_mii_resolve_flowctrl_fdx
	ldr	w8, [x21]
	ands	w8, w8, w0
	cset	w1, ne
	ldr	w9, [x22]
	ands	w21, w9, w0
	cset	w20, ne
	ldrsw	x9, [x19]
	cmp	x1, x9
	b.eq	LBB0_4
; %bb.3:
	cmp	w8, #0
	cset	w8, ne
	str	w8, [x19]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	mov	x0, x19
	blr	x8
LBB0_4:
	ldrsw	x8, [x19, #4]
	cmp	x20, x8
	b.eq	LBB0_6
; %bb.5:
	cmp	w21, #0
	cset	w8, ne
	str	w8, [x19, #4]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x20
	blr	x8
LBB0_6:
	mov	x0, #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	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_FLOW_CTRL_TX,4,2               ; @FLOW_CTRL_TX
	.comm	_FLOW_CTRL_RX,4,2               ; @FLOW_CTRL_RX
	.comm	_LPA_PAUSE_CAP,4,2              ; @LPA_PAUSE_CAP
	.comm	_LPA_PAUSE_ASYM,4,2             ; @LPA_PAUSE_ASYM
	.no_dead_strip	_xgene_enet_flowctrl_cfg
.subsections_via_symbols
