	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __xgbe_phy_config_aneg
___xgbe_phy_config_aneg:                ## @__xgbe_phy_config_aneg
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r12
	callq	_mutex_lock
	movq	_XGBE_LINK_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r12), %r14
	movq	%r14, %rsi
	callq	_set_bit
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%r12)
	movq	%r12, %rdi
	callq	*64(%r12)
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
LBB0_19:
	movq	_XGBE_LINK_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_set_bit
	jmp	LBB0_20
LBB0_1:
	movq	56(%r12), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rcx
LBB0_6:
	movq	_link@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	48(%r12), %edx
	movq	%r12, %rdi
	callq	_netif_dbg
	movl	8(%r12), %edi
	callq	_disable_irq
	testl	%r15d, %r15d
	je	LBB0_15
## %bb.7:
	movq	_XGBE_MODE_KR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_xgbe_use_mode
	testq	%rax, %rax
	jne	LBB0_14
## %bb.8:
	movq	_XGBE_MODE_KX_2500@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_xgbe_use_mode
	testq	%rax, %rax
	jne	LBB0_14
## %bb.9:
	movq	_XGBE_MODE_KX_1000@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_xgbe_use_mode
	testq	%rax, %rax
	jne	LBB0_14
## %bb.10:
	movq	_XGBE_MODE_SFI@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_xgbe_use_mode
	testq	%rax, %rax
	jne	LBB0_14
## %bb.11:
	movq	_XGBE_MODE_X@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_xgbe_use_mode
	testq	%rax, %rax
	jne	LBB0_14
## %bb.12:
	movq	_XGBE_MODE_SGMII_1000@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_xgbe_use_mode
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:
	movq	_XGBE_MODE_SGMII_100@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_xgbe_use_mode
	testq	%rax, %rax
	je	LBB0_17
LBB0_14:
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_xgbe_set_mode
LBB0_15:
	movq	%r12, %rdi
	callq	_xgbe_an_disable_all
	movq	%r12, %rdi
	callq	_xgbe_an_clear_interrupts_all
	movq	_XGBE_AN_READY@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%r12)
	movq	%rax, 32(%r12)
	movq	_XGBE_RX_BPA@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%r12)
	movq	%rax, 16(%r12)
	movl	8(%r12), %edi
	callq	_enable_irq
	movq	%r12, %rdi
	callq	_xgbe_an_init
	movq	%r12, %rdi
	callq	_xgbe_an_restart
LBB0_16:
	movq	_XGBE_LINK_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_clear_bit
	xorl	%ebx, %ebx
LBB0_20:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r12, %rdi
	callq	_xgbe_phy_config_fixed
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.4:
	cmpl	$0, 52(%r12)
	je	LBB0_16
## %bb.5:
	leaq	L_.str(%rip), %rcx
	jmp	LBB0_6
LBB0_17:
	movl	8(%r12), %edi
	callq	_enable_irq
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_16
## %bb.18:
	negl	%ebx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_XGBE_LINK_INIT,4,2             ## @XGBE_LINK_INIT
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_link,4,2                       ## @link
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AN redriver support\n"

L_.str.1:                               ## @.str.1
	.asciz	"AN PHY configuration\n"

	.comm	_XGBE_MODE_KR,4,2               ## @XGBE_MODE_KR
	.comm	_XGBE_MODE_KX_2500,4,2          ## @XGBE_MODE_KX_2500
	.comm	_XGBE_MODE_KX_1000,4,2          ## @XGBE_MODE_KX_1000
	.comm	_XGBE_MODE_SFI,4,2              ## @XGBE_MODE_SFI
	.comm	_XGBE_MODE_X,4,2                ## @XGBE_MODE_X
	.comm	_XGBE_MODE_SGMII_1000,4,2       ## @XGBE_MODE_SGMII_1000
	.comm	_XGBE_MODE_SGMII_100,4,2        ## @XGBE_MODE_SGMII_100
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_XGBE_AN_READY,8,3              ## @XGBE_AN_READY
	.comm	_XGBE_RX_BPA,8,3                ## @XGBE_RX_BPA
	.comm	_XGBE_LINK_ERR,4,2              ## @XGBE_LINK_ERR
	.no_dead_strip	___xgbe_phy_config_aneg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __xgbe_phy_config_aneg
___xgbe_phy_config_aneg:                ; @__xgbe_phy_config_aneg
	.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	x21, x1
	mov	x19, x0
	bl	_mutex_lock
Lloh0:
	adrp	x8, _XGBE_LINK_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XGBE_LINK_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x20, x19, #4
	mov	x1, x20
	bl	_set_bit
Lloh3:
	adrp	x8, _jiffies@GOTPAGE
Lloh4:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #72]
	ldr	x8, [x19, #64]
	mov	x0, x19
	blr	x8
	mov	x22, x0
	cbz	w0, LBB0_2
LBB0_1:
Lloh6:
	adrp	x8, _XGBE_LINK_ERR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XGBE_LINK_ERR@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_set_bit
	b	LBB0_15
LBB0_2:
	ldr	x8, [x19, #56]
Lloh9:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.3:
Lloh12:
	adrp	x3, l_.str.1@PAGE
Lloh13:
	add	x3, x3, l_.str.1@PAGEOFF
LBB0_4:
Lloh14:
	adrp	x8, _link@GOTPAGE
Lloh15:
	ldr	x8, [x8, _link@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldr	w2, [x19, #48]
	mov	x0, x19
	bl	_netif_dbg
	ldr	w0, [x19, #8]
	bl	_disable_irq
	cbz	w21, LBB0_13
; %bb.5:
Lloh17:
	adrp	x21, _XGBE_MODE_KR@GOTPAGE
Lloh18:
	ldr	x21, [x21, _XGBE_MODE_KR@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_xgbe_use_mode
	cbnz	x0, LBB0_12
; %bb.6:
Lloh19:
	adrp	x21, _XGBE_MODE_KX_2500@GOTPAGE
Lloh20:
	ldr	x21, [x21, _XGBE_MODE_KX_2500@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_xgbe_use_mode
	cbnz	x0, LBB0_12
; %bb.7:
Lloh21:
	adrp	x21, _XGBE_MODE_KX_1000@GOTPAGE
Lloh22:
	ldr	x21, [x21, _XGBE_MODE_KX_1000@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_xgbe_use_mode
	cbnz	x0, LBB0_12
; %bb.8:
Lloh23:
	adrp	x21, _XGBE_MODE_SFI@GOTPAGE
Lloh24:
	ldr	x21, [x21, _XGBE_MODE_SFI@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_xgbe_use_mode
	cbnz	x0, LBB0_12
; %bb.9:
Lloh25:
	adrp	x21, _XGBE_MODE_X@GOTPAGE
Lloh26:
	ldr	x21, [x21, _XGBE_MODE_X@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_xgbe_use_mode
	cbnz	x0, LBB0_12
; %bb.10:
Lloh27:
	adrp	x21, _XGBE_MODE_SGMII_1000@GOTPAGE
Lloh28:
	ldr	x21, [x21, _XGBE_MODE_SGMII_1000@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_xgbe_use_mode
	cbnz	x0, LBB0_12
; %bb.11:
Lloh29:
	adrp	x21, _XGBE_MODE_SGMII_100@GOTPAGE
Lloh30:
	ldr	x21, [x21, _XGBE_MODE_SGMII_100@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_xgbe_use_mode
	cbz	x0, LBB0_19
LBB0_12:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_xgbe_set_mode
LBB0_13:
	mov	x0, x19
	bl	_xgbe_an_disable_all
	mov	x0, x19
	bl	_xgbe_an_clear_interrupts_all
Lloh31:
	adrp	x8, _XGBE_AN_READY@GOTPAGE
Lloh32:
	ldr	x8, [x8, _XGBE_AN_READY@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	stp	x8, x8, [x19, #32]
Lloh34:
	adrp	x8, _XGBE_RX_BPA@GOTPAGE
Lloh35:
	ldr	x8, [x8, _XGBE_RX_BPA@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	stp	x8, x8, [x19, #16]
	ldr	w0, [x19, #8]
	bl	_enable_irq
	mov	x0, x19
	bl	_xgbe_an_init
	mov	x0, x19
	bl	_xgbe_an_restart
LBB0_14:
Lloh37:
	adrp	x8, _XGBE_LINK_ERR@GOTPAGE
Lloh38:
	ldr	x8, [x8, _XGBE_LINK_ERR@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_clear_bit
	mov	w22, #0
LBB0_15:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x22
	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
LBB0_16:
	mov	x0, x19
	bl	_xgbe_phy_config_fixed
	mov	x22, x0
	cbnz	w0, LBB0_1
; %bb.17:
	ldr	w8, [x19, #52]
	cbz	w8, LBB0_14
; %bb.18:
Lloh40:
	adrp	x3, l_.str@PAGE
Lloh41:
	add	x3, x3, l_.str@PAGEOFF
	b	LBB0_4
LBB0_19:
	ldr	w0, [x19, #8]
	bl	_enable_irq
Lloh42:
	adrp	x8, _EINVAL@GOTPAGE
Lloh43:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	cbz	w8, LBB0_14
; %bb.20:
	neg	w22, w8
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_XGBE_LINK_INIT,4,2             ; @XGBE_LINK_INIT
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_link,4,2                       ; @link
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AN redriver support\n"

l_.str.1:                               ; @.str.1
	.asciz	"AN PHY configuration\n"

	.comm	_XGBE_MODE_KR,4,2               ; @XGBE_MODE_KR
	.comm	_XGBE_MODE_KX_2500,4,2          ; @XGBE_MODE_KX_2500
	.comm	_XGBE_MODE_KX_1000,4,2          ; @XGBE_MODE_KX_1000
	.comm	_XGBE_MODE_SFI,4,2              ; @XGBE_MODE_SFI
	.comm	_XGBE_MODE_X,4,2                ; @XGBE_MODE_X
	.comm	_XGBE_MODE_SGMII_1000,4,2       ; @XGBE_MODE_SGMII_1000
	.comm	_XGBE_MODE_SGMII_100,4,2        ; @XGBE_MODE_SGMII_100
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_XGBE_AN_READY,8,3              ; @XGBE_AN_READY
	.comm	_XGBE_RX_BPA,8,3                ; @XGBE_RX_BPA
	.comm	_XGBE_LINK_ERR,4,2              ; @XGBE_LINK_ERR
	.no_dead_strip	___xgbe_phy_config_aneg
.subsections_via_symbols
