	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function port_r_mib_cnt
_port_r_mib_cnt:                        ## @port_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
                                        ## kill: def $edx killed $edx def $rdx
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, %r12
	movq	_PORT_COUNTER_NUM@GOTPCREL(%rip), %rax
	imull	(%rax), %esi
	leal	(%rsi,%rdx), %ebx
	callq	_hw_block_intr
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_TABLE_MIB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TABLE_SEL_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edi
	movq	_TABLE_READ@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	shll	$8, %edi
	orl	%ebx, %edi
	movq	_KS884X_IACR_OFFSET@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	addq	(%r12), %rsi
	callq	_writew
	movq	(%rbx), %rsi
	movq	%r12, %rdi
	callq	_HW_DELAY
	movl	$101, %ebx
	movq	_KS884X_ACC_DATA_0_OFFSET@GOTPCREL(%rip), %r13
	movq	_MIB_COUNTER_VALID@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	addq	(%r12), %rdi
	callq	_readl
	testl	%eax, (%r15)
	jne	LBB0_3
## %bb.1:                               ##   in Loop: Header=BB0_2 Depth=1
	decl	%ebx
	cmpl	$2, %ebx
	jae	LBB0_2
	jmp	LBB0_7
LBB0_3:
	movq	_MIB_COUNTER_OVERFLOW@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.5:
	movq	_MIB_COUNTER_VALUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	(%r14), %edx
	addl	%edx, %ecx
	incl	%ecx
	movl	%ecx, (%r14)
	jmp	LBB0_6
LBB0_4:
	movl	(%r14), %ecx
LBB0_6:
	movq	_MIB_COUNTER_VALUE@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	addl	%ecx, %eax
	movl	%eax, (%r14)
LBB0_7:
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hw_restore_intr                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PORT_COUNTER_NUM,4,2           ## @PORT_COUNTER_NUM
	.comm	_TABLE_MIB,4,2                  ## @TABLE_MIB
	.comm	_TABLE_SEL_SHIFT,4,2            ## @TABLE_SEL_SHIFT
	.comm	_TABLE_READ,4,2                 ## @TABLE_READ
	.comm	_KS884X_IACR_OFFSET,8,3         ## @KS884X_IACR_OFFSET
	.comm	_KS884X_ACC_DATA_0_OFFSET,8,3   ## @KS884X_ACC_DATA_0_OFFSET
	.comm	_MIB_COUNTER_VALID,4,2          ## @MIB_COUNTER_VALID
	.comm	_MIB_COUNTER_OVERFLOW,4,2       ## @MIB_COUNTER_OVERFLOW
	.comm	_MIB_COUNTER_VALUE,4,2          ## @MIB_COUNTER_VALUE
	.no_dead_strip	_port_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 port_r_mib_cnt
_port_r_mib_cnt:                        ; @port_r_mib_cnt
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	mov	x20, x0
Lloh0:
	adrp	x8, _PORT_COUNTER_NUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PORT_COUNTER_NUM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	madd	w22, w8, w1, w2
	bl	_hw_block_intr
	mov	x21, x0
Lloh3:
	adrp	x8, _TABLE_MIB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TABLE_MIB@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _TABLE_SEL_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TABLE_SEL_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	lsl	w8, w8, w9
Lloh9:
	adrp	x9, _TABLE_READ@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TABLE_READ@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
	orr	w0, w22, w8, lsl #8
	ldr	x8, [x20]
Lloh12:
	adrp	x22, _KS884X_IACR_OFFSET@GOTPAGE
Lloh13:
	ldr	x22, [x22, _KS884X_IACR_OFFSET@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writew
	ldr	x1, [x22]
	mov	x0, x20
	bl	_HW_DELAY
	mov	w22, #101
Lloh14:
	adrp	x23, _KS884X_ACC_DATA_0_OFFSET@GOTPAGE
Lloh15:
	ldr	x23, [x23, _KS884X_ACC_DATA_0_OFFSET@GOTPAGEOFF]
Lloh16:
	adrp	x24, _MIB_COUNTER_VALID@GOTPAGE
Lloh17:
	ldr	x24, [x24, _MIB_COUNTER_VALID@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x24]
	tst	w8, w0
	b.ne	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	w22, w22, #1
	cmp	w22, #2
	b.hs	LBB0_1
	b	LBB0_7
LBB0_3:
Lloh18:
	adrp	x8, _MIB_COUNTER_OVERFLOW@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MIB_COUNTER_OVERFLOW@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x8]
Lloh21:
	adrp	x8, _MIB_COUNTER_VALUE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MIB_COUNTER_VALUE@GOTPAGEOFF]
	tst	w9, w0
	b.eq	LBB0_5
; %bb.4:
	ldr	w9, [x8]
	ldr	w10, [x19]
	add	w9, w9, w10
	add	w9, w9, #1
	str	w9, [x19]
	b	LBB0_6
LBB0_5:
	ldr	w9, [x19]
LBB0_6:
	ldr	w8, [x8]
	and	w8, w8, w0
	add	w8, w9, w8
	str	w8, [x19]
LBB0_7:
	mov	x0, x20
	mov	x1, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_hw_restore_intr
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_PORT_COUNTER_NUM,4,2           ; @PORT_COUNTER_NUM
	.comm	_TABLE_MIB,4,2                  ; @TABLE_MIB
	.comm	_TABLE_SEL_SHIFT,4,2            ; @TABLE_SEL_SHIFT
	.comm	_TABLE_READ,4,2                 ; @TABLE_READ
	.comm	_KS884X_IACR_OFFSET,8,3         ; @KS884X_IACR_OFFSET
	.comm	_KS884X_ACC_DATA_0_OFFSET,8,3   ; @KS884X_ACC_DATA_0_OFFSET
	.comm	_MIB_COUNTER_VALID,4,2          ; @MIB_COUNTER_VALID
	.comm	_MIB_COUNTER_OVERFLOW,4,2       ; @MIB_COUNTER_OVERFLOW
	.comm	_MIB_COUNTER_VALUE,4,2          ; @MIB_COUNTER_VALUE
	.no_dead_strip	_port_r_mib_cnt
.subsections_via_symbols
