	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s2io_updt_xpak_counter
_s2io_updt_xpak_counter:                ## @s2io_updt_xpak_counter
	.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	(%rax), %r12
	movq	_MDIO_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MDIO_MMD_PMAPMD@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	%rbx, %rdx
	callq	_s2io_mdio_read
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	je	LBB0_22
## %bb.1:
	testl	%eax, %eax
	jne	LBB0_2
LBB0_22:
	movq	_ERR_DBG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%eax, %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DBG_PRINT                      ## TAILCALL
LBB0_2:
	movq	_MDIO_CTRL1_SPEED10G@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	jne	LBB0_23
## %bb.3:
	movl	(%r13), %edi
	movl	$41216, %esi                    ## imm = 0xA100
	xorl	%edx, %edx
	movq	%rbx, %rcx
	callq	_s2io_mdio_write
	movl	(%r13), %edi
	movl	$41216, %esi                    ## imm = 0xA100
	movq	%rbx, %rdx
	callq	_s2io_mdio_read
	movl	(%r13), %edi
	movl	$41072, %esi                    ## imm = 0xA070
	movq	%rbx, %rdx
	callq	_s2io_mdio_read
	movl	%eax, %r14d
	movl	%eax, %edi
	movl	$7, %esi
	callq	_CHECKBIT
	leaq	48(%r12), %rdi
	leaq	28(%r12), %r15
	movq	%r15, %rsi
	xorl	%edx, %edx
	movl	%eax, %ecx
	movl	$1, %r8d
	callq	_s2io_chk_xpak_counter
	movl	%r14d, %edi
	movl	$6, %esi
	callq	_CHECKBIT
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	incl	44(%r12)
LBB0_5:
	movl	%r14d, %edi
	movl	$3, %esi
	callq	_CHECKBIT
	leaq	40(%r12), %rdi
	movq	%r15, %rsi
	movl	$2, %edx
	movl	%eax, %ecx
	movl	$2, %r8d
	callq	_s2io_chk_xpak_counter
	movl	%r14d, %edi
	movl	$2, %esi
	callq	_CHECKBIT
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	incl	36(%r12)
LBB0_7:
	movl	%r14d, %edi
	movl	$1, %esi
	callq	_CHECKBIT
	leaq	32(%r12), %rdi
	movq	%r15, %rsi
	movl	$4, %edx
	movl	%eax, %ecx
	movl	$3, %r8d
	callq	_s2io_chk_xpak_counter
	movl	%r14d, %edi
	xorl	%esi, %esi
	callq	_CHECKBIT
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	incl	24(%r12)
LBB0_9:
	movl	(%r13), %edi
	movl	$41076, %esi                    ## imm = 0xA074
	movq	%rbx, %rdx
	callq	_s2io_mdio_read
	movl	%eax, %ebx
	movl	%eax, %edi
	movl	$7, %esi
	callq	_CHECKBIT
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	incl	20(%r12)
LBB0_11:
	movl	%ebx, %edi
	movl	$6, %esi
	callq	_CHECKBIT
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	incl	16(%r12)
LBB0_13:
	movl	%ebx, %edi
	movl	$3, %esi
	callq	_CHECKBIT
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	incl	12(%r12)
LBB0_15:
	movl	%ebx, %edi
	movl	$2, %esi
	callq	_CHECKBIT
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	incl	8(%r12)
LBB0_17:
	movl	%ebx, %edi
	movl	$1, %esi
	callq	_CHECKBIT
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	incl	4(%r12)
LBB0_19:
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_CHECKBIT
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:
	incl	(%r12)
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movq	_ERR_DBG@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	movslq	%eax, %rdx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DBG_PRINT                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MDIO_CTRL1,4,2                 ## @MDIO_CTRL1
	.comm	_MDIO_MMD_PMAPMD,4,2            ## @MDIO_MMD_PMAPMD
	.comm	_ERR_DBG,4,2                    ## @ERR_DBG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ERR: MDIO slave access failed - Returned %llx\n"

	.comm	_MDIO_CTRL1_SPEED10G,4,2        ## @MDIO_CTRL1_SPEED10G
L_.str.1:                               ## @.str.1
	.asciz	"Incorrect value at PMA address 0x0000 - Returned: %llx- Expected: 0x%x\n"

	.no_dead_strip	_s2io_updt_xpak_counter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s2io_updt_xpak_counter
_s2io_updt_xpak_counter:                ; @s2io_updt_xpak_counter
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	bl	_netdev_priv
	ldr	x22, [x0]
Lloh0:
	adrp	x8, _MDIO_CTRL1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MDIO_CTRL1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x23, _MDIO_MMD_PMAPMD@GOTPAGE
Lloh4:
	ldr	x23, [x23, _MDIO_MMD_PMAPMD@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	x2, x19
	bl	_s2io_mdio_read
                                        ; kill: def $w0 killed $w0 def $x0
	mov	w8, #65535
	cmp	w0, w8
	ccmp	w0, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _ERR_DBG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERR_DBG@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	mov	w2, w0
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_DBG_PRINT
LBB0_2:
Lloh10:
	adrp	x8, _MDIO_CTRL1_SPEED10G@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MDIO_CTRL1_SPEED10G@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x8]
	cmp	w0, w9
	b.ne	LBB0_21
; %bb.3:
	ldr	w0, [x23]
	mov	w1, #41216
	mov	w2, #0
	mov	x3, x19
	bl	_s2io_mdio_write
	ldr	w0, [x23]
	mov	w1, #41216
	mov	x2, x19
	bl	_s2io_mdio_read
	ldr	w0, [x23]
	mov	w1, #41072
	mov	x2, x19
	bl	_s2io_mdio_read
	mov	x20, x0
	mov	w1, #7
	bl	_CHECKBIT
	mov	x3, x0
	add	x0, x22, #48
	add	x21, x22, #28
	mov	x1, x21
	mov	w2, #0
	mov	w4, #1
	bl	_s2io_chk_xpak_counter
	mov	x0, x20
	mov	w1, #6
	bl	_CHECKBIT
	cbz	w0, LBB0_5
; %bb.4:
	ldr	w8, [x22, #44]
	add	w8, w8, #1
	str	w8, [x22, #44]
LBB0_5:
	mov	x0, x20
	mov	w1, #3
	bl	_CHECKBIT
	mov	x3, x0
	add	x0, x22, #40
	mov	x1, x21
	mov	w2, #2
	mov	w4, #2
	bl	_s2io_chk_xpak_counter
	mov	x0, x20
	mov	w1, #2
	bl	_CHECKBIT
	cbz	w0, LBB0_7
; %bb.6:
	ldr	w8, [x22, #36]
	add	w8, w8, #1
	str	w8, [x22, #36]
LBB0_7:
	mov	x0, x20
	mov	w1, #1
	bl	_CHECKBIT
	mov	x3, x0
	add	x0, x22, #32
	mov	x1, x21
	mov	w2, #4
	mov	w4, #3
	bl	_s2io_chk_xpak_counter
	mov	x0, x20
	mov	w1, #0
	bl	_CHECKBIT
	cbz	w0, LBB0_9
; %bb.8:
	ldr	w8, [x22, #24]
	add	w8, w8, #1
	str	w8, [x22, #24]
LBB0_9:
	ldr	w0, [x23]
	mov	w1, #41076
	mov	x2, x19
	bl	_s2io_mdio_read
	mov	x19, x0
	mov	w1, #7
	bl	_CHECKBIT
	cbz	w0, LBB0_11
; %bb.10:
	ldr	w8, [x22, #20]
	add	w8, w8, #1
	str	w8, [x22, #20]
LBB0_11:
	mov	x0, x19
	mov	w1, #6
	bl	_CHECKBIT
	cbz	w0, LBB0_13
; %bb.12:
	ldr	w8, [x22, #16]
	add	w8, w8, #1
	str	w8, [x22, #16]
LBB0_13:
	mov	x0, x19
	mov	w1, #3
	bl	_CHECKBIT
	cbz	w0, LBB0_15
; %bb.14:
	ldr	w8, [x22, #12]
	add	w8, w8, #1
	str	w8, [x22, #12]
LBB0_15:
	mov	x0, x19
	mov	w1, #2
	bl	_CHECKBIT
	cbz	w0, LBB0_17
; %bb.16:
	ldr	w8, [x22, #8]
	add	w8, w8, #1
	str	w8, [x22, #8]
LBB0_17:
	mov	x0, x19
	mov	w1, #1
	bl	_CHECKBIT
	cbz	w0, LBB0_19
; %bb.18:
	ldr	w8, [x22, #4]
	add	w8, w8, #1
	str	w8, [x22, #4]
LBB0_19:
	mov	x0, x19
	mov	w1, #0
	bl	_CHECKBIT
	cbz	w0, LBB0_22
; %bb.20:
	ldr	w8, [x22]
	add	w8, w8, #1
	str	w8, [x22]
	b	LBB0_22
LBB0_21:
Lloh13:
	adrp	x8, _ERR_DBG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ERR_DBG@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	sxtw	x2, w0
	str	x9, [sp]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
	bl	_DBG_PRINT
LBB0_22:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MDIO_CTRL1,4,2                 ; @MDIO_CTRL1
	.comm	_MDIO_MMD_PMAPMD,4,2            ; @MDIO_MMD_PMAPMD
	.comm	_ERR_DBG,4,2                    ; @ERR_DBG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ERR: MDIO slave access failed - Returned %llx\n"

	.comm	_MDIO_CTRL1_SPEED10G,4,2        ; @MDIO_CTRL1_SPEED10G
l_.str.1:                               ; @.str.1
	.asciz	"Incorrect value at PMA address 0x0000 - Returned: %llx- Expected: 0x%x\n"

	.no_dead_strip	_s2io_updt_xpak_counter
.subsections_via_symbols
