	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ksz8795_r_mib_pkt
_ksz8795_r_mib_pkt:                     ## @ksz8795_r_mib_pkt
	.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	%r8, %r14
	movl	%edx, %r12d
	movq	%rdi, %r15
	movq	_SWITCH_COUNTER_NUM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	movq	_KS_MIB_TOTAL_RX_1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_KS_MIB_TOTAL_RX_0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	subl	%ebx, %eax
	imull	%esi, %eax
	addl	%r12d, %ebx
	addl	%eax, %ebx
	movq	_TABLE_MIB@GOTPCREL(%rip), %rax
	movq	_TABLE_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	callq	_IND_ACC_TABLE
	orl	%eax, %ebx
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_REG_IND_CTRL_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_ksz_write16
	movq	_REG_IND_MIB_CHECK@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_ksz_read8
	movq	_MIB_COUNTER_VALID@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, -44(%rbp)
	jne	LBB0_2
## %bb.1:
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_ksz_read8
	movl	(%rbx), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_7
LBB0_2:
	movq	_REG_IND_DATA_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	callq	_ksz_read32
	cmpl	$2, %r12d
	jl	LBB0_7
## %bb.3:
	movq	_MIB_COUNTER_OVERFLOW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_4
## %bb.5:
	movq	_MIB_PACKET_DROPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%r14), %ecx
	addl	%ecx, %eax
	incl	%eax
	movl	%eax, (%r14)
	jmp	LBB0_6
LBB0_4:
	movl	(%r14), %eax
LBB0_6:
	movq	_MIB_PACKET_DROPPED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	-48(%rbp), %ecx
	addl	%eax, %ecx
	movl	%ecx, (%r14)
LBB0_7:
	movq	%r15, %rdi
	callq	_mutex_unlock
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SWITCH_COUNTER_NUM,8,3         ## @SWITCH_COUNTER_NUM
	.comm	_KS_MIB_TOTAL_RX_1,4,2          ## @KS_MIB_TOTAL_RX_1
	.comm	_KS_MIB_TOTAL_RX_0,4,2          ## @KS_MIB_TOTAL_RX_0
	.comm	_TABLE_MIB,4,2                  ## @TABLE_MIB
	.comm	_TABLE_READ,4,2                 ## @TABLE_READ
	.comm	_REG_IND_CTRL_0,4,2             ## @REG_IND_CTRL_0
	.comm	_REG_IND_MIB_CHECK,4,2          ## @REG_IND_MIB_CHECK
	.comm	_MIB_COUNTER_VALID,4,2          ## @MIB_COUNTER_VALID
	.comm	_REG_IND_DATA_LO,4,2            ## @REG_IND_DATA_LO
	.comm	_MIB_TOTAL_BYTES_H,4,2          ## @MIB_TOTAL_BYTES_H
	.comm	_MIB_COUNTER_OVERFLOW,4,2       ## @MIB_COUNTER_OVERFLOW
	.comm	_MIB_PACKET_DROPPED,4,2         ## @MIB_PACKET_DROPPED
	.no_dead_strip	_ksz8795_r_mib_pkt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ksz8795_r_mib_pkt
_ksz8795_r_mib_pkt:                     ; @ksz8795_r_mib_pkt
	.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	x20, x4
	mov	x19, x0
Lloh0:
	adrp	x8, _SWITCH_COUNTER_NUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SWITCH_COUNTER_NUM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _KS_MIB_TOTAL_RX_1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _KS_MIB_TOTAL_RX_1@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _KS_MIB_TOTAL_RX_0@GOTPAGE
Lloh7:
	ldr	x10, [x10, _KS_MIB_TOTAL_RX_0@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	sub	w9, w9, w10
	sub	w22, w2, w8
	add	w8, w22, w10
Lloh9:
	adrp	x10, _TABLE_MIB@GOTPAGE
Lloh10:
	ldr	x10, [x10, _TABLE_MIB@GOTPAGEOFF]
	madd	w21, w9, w1, w8
Lloh11:
	ldr	w8, [x10]
Lloh12:
	adrp	x9, _TABLE_READ@GOTPAGE
Lloh13:
	ldr	x9, [x9, _TABLE_READ@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_IND_ACC_TABLE
	orr	w21, w21, w0
	mov	x0, x19
	bl	_mutex_lock
Lloh15:
	adrp	x8, _REG_IND_CTRL_0@GOTPAGE
Lloh16:
	ldr	x8, [x8, _REG_IND_CTRL_0@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_ksz_write16
Lloh18:
	adrp	x21, _REG_IND_MIB_CHECK@GOTPAGE
Lloh19:
	ldr	x21, [x21, _REG_IND_MIB_CHECK@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	bl	_ksz_read8
	ldr	w8, [sp, #8]
Lloh20:
	adrp	x23, _MIB_COUNTER_VALID@GOTPAGE
Lloh21:
	ldr	x23, [x23, _MIB_COUNTER_VALID@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.1:
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	bl	_ksz_read8
	ldr	w8, [sp, #8]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_7
LBB0_2:
Lloh22:
	adrp	x8, _REG_IND_DATA_LO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _REG_IND_DATA_LO@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_ksz_read32
	cmp	w22, #2
	b.lt	LBB0_7
; %bb.3:
	ldr	w9, [sp, #8]
Lloh25:
	adrp	x8, _MIB_COUNTER_OVERFLOW@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MIB_COUNTER_OVERFLOW@GOTPAGEOFF]
Lloh27:
	ldr	w10, [x8]
Lloh28:
	adrp	x8, _MIB_PACKET_DROPPED@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MIB_PACKET_DROPPED@GOTPAGEOFF]
	tst	w10, w9
	b.eq	LBB0_5
; %bb.4:
	ldr	w9, [x8]
	ldr	w10, [x20]
	add	w9, w9, w10
	add	w9, w9, #1
	str	w9, [x20]
	b	LBB0_6
LBB0_5:
	ldr	w9, [x20]
LBB0_6:
	ldr	w10, [sp, #12]
	ldr	w8, [x8]
	and	w8, w8, w10
	add	w8, w9, w8
	str	w8, [x20]
LBB0_7:
	mov	x0, x19
	bl	_mutex_unlock
	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	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_SWITCH_COUNTER_NUM,8,3         ; @SWITCH_COUNTER_NUM
	.comm	_KS_MIB_TOTAL_RX_1,4,2          ; @KS_MIB_TOTAL_RX_1
	.comm	_KS_MIB_TOTAL_RX_0,4,2          ; @KS_MIB_TOTAL_RX_0
	.comm	_TABLE_MIB,4,2                  ; @TABLE_MIB
	.comm	_TABLE_READ,4,2                 ; @TABLE_READ
	.comm	_REG_IND_CTRL_0,4,2             ; @REG_IND_CTRL_0
	.comm	_REG_IND_MIB_CHECK,4,2          ; @REG_IND_MIB_CHECK
	.comm	_MIB_COUNTER_VALID,4,2          ; @MIB_COUNTER_VALID
	.comm	_REG_IND_DATA_LO,4,2            ; @REG_IND_DATA_LO
	.comm	_MIB_TOTAL_BYTES_H,4,2          ; @MIB_TOTAL_BYTES_H
	.comm	_MIB_COUNTER_OVERFLOW,4,2       ; @MIB_COUNTER_OVERFLOW
	.comm	_MIB_PACKET_DROPPED,4,2         ; @MIB_PACKET_DROPPED
	.no_dead_strip	_ksz8795_r_mib_pkt
.subsections_via_symbols
