	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgbe_an37_state_machine
_xgbe_an37_state_machine:               ## @xgbe_an37_state_machine
	.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	4(%rdi), %eax
	testl	%eax, %eax
	je	LBB0_17
## %bb.1:
	movq	%rdi, %rbx
	movq	_XGBE_AN_CL37_INT_CMPLT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.3:
	movl	$130, (%rbx)
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 4(%rbx)
	movq	8(%rbx), %rax
	movq	_XGBE_AN_MODE_CL37_SGMII@GOTPCREL(%rip), %rcx
	movl	$130, %edi
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.4:
	movq	_XGBE_SGMII_AN_LINK_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%rbx)
	jne	LBB0_6
## %bb.5:
	movl	$129, (%rbx)
	movl	$129, %edi
	jmp	LBB0_6
LBB0_17:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	(%rbx), %edi
LBB0_6:
	movq	_link@GOTPCREL(%rip), %r12
	movl	(%r12), %r14d
	movl	24(%rbx), %r15d
	callq	_xgbe_state_as_string
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_netif_dbg
	movl	(%rbx), %r14d
	leal	-128(%r14), %eax
	movl	%r14d, %edi
	cmpl	$2, %eax
	jb	LBB0_10
## %bb.7:
	cmpl	$130, %r14d
	jne	LBB0_9
## %bb.8:
	movl	(%r12), %esi
	movl	24(%rbx), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_netif_dbg
	movl	(%rbx), %edi
	jmp	LBB0_10
LBB0_9:
	movq	_XGBE_AN_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, (%rbx)
LBB0_10:
	movq	_XGBE_AN_ERROR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	jne	LBB0_12
## %bb.11:
	movl	24(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edx
	callq	_netdev_err
	movl	$0, 4(%rbx)
	movq	%rbx, %rdi
	callq	_xgbe_an37_clear_interrupts
	movl	(%rbx), %edi
LBB0_12:
	cmpl	$130, %edi
	jl	LBB0_16
## %bb.13:
	movl	%edi, 20(%rbx)
	movl	$128, (%rbx)
	movq	32(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	%rbx, %rdi
	callq	*%rax
	movl	20(%rbx), %edi
LBB0_15:
	movl	(%r12), %r14d
	movl	24(%rbx), %r15d
	callq	_xgbe_state_as_string
	leaq	L_.str.3(%rip), %rcx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_netif_dbg
LBB0_16:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_xgbe_an37_enable_interrupts    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_XGBE_AN_CL37_INT_CMPLT,4,2     ## @XGBE_AN_CL37_INT_CMPLT
	.comm	_XGBE_AN_MODE_CL37_SGMII,8,3    ## @XGBE_AN_MODE_CL37_SGMII
	.comm	_XGBE_SGMII_AN_LINK_STATUS,4,2  ## @XGBE_SGMII_AN_LINK_STATUS
	.comm	_link,4,2                       ## @link
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CL37 AN %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"Auto negotiation successful\n"

	.comm	_XGBE_AN_ERROR,4,2              ## @XGBE_AN_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"error during auto-negotiation, state=%u\n"

L_.str.3:                               ## @.str.3
	.asciz	"CL37 AN result: %s\n"

	.no_dead_strip	_xgbe_an37_state_machine
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgbe_an37_state_machine
_xgbe_an37_state_machine:               ; @xgbe_an37_state_machine
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	w8, [x0, #4]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x9, _XGBE_AN_CL37_INT_CMPLT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _XGBE_AN_CL37_INT_CMPLT@GOTPAGEOFF]
	ldr	w10, [x9]
	tst	w10, w8
	b.eq	LBB0_6
; %bb.2:
	mov	w0, #130
	str	w0, [x19]
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	w8, [x19, #4]
	ldr	x8, [x19, #8]
Lloh2:
	adrp	x9, _XGBE_AN_MODE_CL37_SGMII@GOTPAGE
Lloh3:
	ldr	x9, [x9, _XGBE_AN_MODE_CL37_SGMII@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.3:
	ldr	w8, [x19, #16]
Lloh5:
	adrp	x9, _XGBE_SGMII_AN_LINK_STATUS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _XGBE_SGMII_AN_LINK_STATUS@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.4:
	mov	w0, #130
	b	LBB0_8
LBB0_5:
	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
	add	sp, sp, #64
	ret
LBB0_6:
	ldr	w0, [x19]
	b	LBB0_8
LBB0_7:
	mov	w0, #129
	str	w0, [x19]
LBB0_8:
Lloh8:
	adrp	x22, _link@GOTPAGE
Lloh9:
	ldr	x22, [x22, _link@GOTPAGEOFF]
	ldr	w20, [x22]
	ldr	w21, [x19, #24]
	bl	_xgbe_state_as_string
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh10:
	adrp	x3, l_.str@PAGE
Lloh11:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_netif_dbg
	ldr	w20, [x19]
	sub	w8, w20, #128
Lloh12:
	adrp	x21, _XGBE_AN_ERROR@GOTPAGE
Lloh13:
	ldr	x21, [x21, _XGBE_AN_ERROR@GOTPAGEOFF]
	mov	x0, x20
	cmp	w8, #2
	b.lo	LBB0_12
; %bb.9:
	cmp	w20, #130
	b.ne	LBB0_11
; %bb.10:
	ldr	w1, [x22]
	ldr	w2, [x19, #24]
Lloh14:
	adrp	x3, l_.str.1@PAGE
Lloh15:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netif_dbg
	ldr	w0, [x19]
	b	LBB0_12
LBB0_11:
	ldr	w0, [x21]
	str	w0, [x19]
LBB0_12:
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_14
; %bb.13:
	ldr	w0, [x19, #24]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	bl	_netdev_err
	str	wzr, [x19, #4]
	mov	x0, x19
	bl	_xgbe_an37_clear_interrupts
	ldr	w0, [x19]
LBB0_14:
	cmp	w0, #130
	b.lt	LBB0_18
; %bb.15:
	str	w0, [x19, #20]
	mov	w8, #128
	str	w8, [x19]
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_17
; %bb.16:
	mov	x0, x19
	blr	x8
	ldr	w0, [x19, #20]
LBB0_17:
	ldr	w20, [x22]
	ldr	w21, [x19, #24]
	bl	_xgbe_state_as_string
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh18:
	adrp	x3, l_.str.3@PAGE
Lloh19:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_netif_dbg
LBB0_18:
	mov	x0, x19
	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
	add	sp, sp, #64
	b	_xgbe_an37_enable_interrupts
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_XGBE_AN_CL37_INT_CMPLT,4,2     ; @XGBE_AN_CL37_INT_CMPLT
	.comm	_XGBE_AN_MODE_CL37_SGMII,8,3    ; @XGBE_AN_MODE_CL37_SGMII
	.comm	_XGBE_SGMII_AN_LINK_STATUS,4,2  ; @XGBE_SGMII_AN_LINK_STATUS
	.comm	_link,4,2                       ; @link
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CL37 AN %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"Auto negotiation successful\n"

	.comm	_XGBE_AN_ERROR,4,2              ; @XGBE_AN_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"error during auto-negotiation, state=%u\n"

l_.str.3:                               ; @.str.3
	.asciz	"CL37 AN result: %s\n"

	.no_dead_strip	_xgbe_an37_state_machine
.subsections_via_symbols
