	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ksz9477_r_mib_cnt
_ksz9477_r_mib_cnt:                     ## @ksz9477_r_mib_cnt
	.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	%rcx, %r14
	movl	%edx, %eax
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	16(%rdi), %rcx
	movslq	%esi, %rsi
	xorl	%edx, %edx
	cmpq	$0, (%rcx,%rsi,8)
	je	LBB0_2
## %bb.1:
	movq	_MIB_COUNTER_FLUSH_FREEZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
LBB0_2:
	movq	_MIB_COUNTER_READ@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_MIB_COUNTER_INDEX_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%edx, %eax
	movl	%eax, -44(%rbp)
	movq	_REG_PORT_MIB_CTRL_STAT__4@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%eax, %ecx
	callq	_ksz_pwrite32
	movq	8(%rbx), %rax
	movl	8(%rax), %r12d
	movl	(%r13), %esi
	movl	%r15d, %edi
	callq	_PORT_CTRL_ADDR
	movl	%r12d, %edi
	movl	%eax, %esi
	movl	$1, %ecx
	movl	$10, %r8d
	movl	$1000, %r9d                     ## imm = 0x3E8
	callq	_regmap_read_poll_timeout
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
LBB0_3:
	movq	_REG_PORT_MIB_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_ksz_pread32
	movl	-44(%rbp), %eax
	addl	%eax, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MIB_COUNTER_FLUSH_FREEZE,4,2   ## @MIB_COUNTER_FLUSH_FREEZE
	.comm	_MIB_COUNTER_READ,4,2           ## @MIB_COUNTER_READ
	.comm	_MIB_COUNTER_INDEX_S,4,2        ## @MIB_COUNTER_INDEX_S
	.comm	_REG_PORT_MIB_CTRL_STAT__4,4,2  ## @REG_PORT_MIB_CTRL_STAT__4
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get MIB\n"

	.comm	_REG_PORT_MIB_DATA,4,2          ## @REG_PORT_MIB_DATA
	.no_dead_strip	_ksz9477_r_mib_cnt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ksz9477_r_mib_cnt
_ksz9477_r_mib_cnt:                     ; @ksz9477_r_mib_cnt
	.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, x3
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x0, #16]
	ldr	x8, [x8, w1, sxtw #3]
Lloh0:
	adrp	x9, _MIB_COUNTER_FLUSH_FREEZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MIB_COUNTER_FLUSH_FREEZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	x8, #0
Lloh3:
	adrp	x8, _MIB_COUNTER_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MIB_COUNTER_READ@GOTPAGEOFF]
	csel	w9, wzr, w9, eq
Lloh5:
	ldr	w8, [x8]
	orr	w8, w8, w9
Lloh6:
	adrp	x9, _MIB_COUNTER_INDEX_S@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MIB_COUNTER_INDEX_S@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	lsl	w9, w2, w9
	orr	w3, w9, w8
	str	w3, [sp, #12]
Lloh9:
	adrp	x23, _REG_PORT_MIB_CTRL_STAT__4@GOTPAGE
Lloh10:
	ldr	x23, [x23, _REG_PORT_MIB_CTRL_STAT__4@GOTPAGEOFF]
	ldr	w2, [x23]
	bl	_ksz_pwrite32
	ldr	x8, [x21, #8]
	ldr	w22, [x8, #8]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_PORT_CTRL_ADDR
	mov	x1, x0
	mov	x0, x22
	mov	w3, #1
	mov	w4, #10
	mov	w5, #1000
	bl	_regmap_read_poll_timeout
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x21]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	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	_dev_dbg
LBB0_2:
Lloh13:
	adrp	x8, _REG_PORT_MIB_DATA@GOTPAGE
Lloh14:
	ldr	x8, [x8, _REG_PORT_MIB_DATA@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x21
	mov	x1, x20
	bl	_ksz_pread32
	ldr	w8, [sp, #12]
	ldr	w9, [x19]
	add	w8, w9, w8
	str	w8, [x19]
	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	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MIB_COUNTER_FLUSH_FREEZE,4,2   ; @MIB_COUNTER_FLUSH_FREEZE
	.comm	_MIB_COUNTER_READ,4,2           ; @MIB_COUNTER_READ
	.comm	_MIB_COUNTER_INDEX_S,4,2        ; @MIB_COUNTER_INDEX_S
	.comm	_REG_PORT_MIB_CTRL_STAT__4,4,2  ; @REG_PORT_MIB_CTRL_STAT__4
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get MIB\n"

	.comm	_REG_PORT_MIB_DATA,4,2          ; @REG_PORT_MIB_DATA
	.no_dead_strip	_ksz9477_r_mib_cnt
.subsections_via_symbols
