	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8366rb_get_mib_counter
_rtl8366rb_get_mib_counter:             ## @rtl8366rb_get_mib_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
	movl	%esi, %ebx
	movq	_RTL8366RB_MIB_COUNTER_BASE@GOTPCREL(%rip), %rax
	movq	_RTL8366RB_MIB_COUNTER_PORT_OFFSET@GOTPCREL(%rip), %rsi
	imull	(%rsi), %ebx
	addl	(%rax), %ebx
	movq	%rcx, %r14
	movq	%rdx, %r13
	movq	%rdi, %r15
	addl	8(%rdx), %ebx
	movl	(%rdi), %edi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_regmap_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movl	(%r15), %edi
	movq	_RTL8366RB_MIB_CTRL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	je	LBB0_4
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_4:
	movl	-44(%rbp), %eax
	movq	_RTL8366RB_MIB_CTRL_BUSY_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.5:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_12:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_RTL8366RB_MIB_CTRL_RESET_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_2
## %bb.7:
	movl	$0, (%r14)
	movl	(%r13), %r13d
	xorl	%r12d, %r12d
	testl	%r13d, %r13d
	jle	LBB0_12
## %bb.8:
	incl	%r13d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	leal	(%rbx,%r13), %esi
	addl	$-2, %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r14), %eax
	shll	$16, %eax
	movzwl	-44(%rbp), %ecx
	orl	%eax, %ecx
	movl	%ecx, (%r14)
	decl	%r13d
	cmpl	$1, %r13d
	ja	LBB0_9
	jmp	LBB0_12
LBB0_10:
	movl	%eax, %r12d
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_RTL8366RB_MIB_COUNTER_BASE,4,2 ## @RTL8366RB_MIB_COUNTER_BASE
	.comm	_RTL8366RB_MIB_COUNTER_PORT_OFFSET,4,2 ## @RTL8366RB_MIB_COUNTER_PORT_OFFSET
	.comm	_RTL8366RB_MIB_CTRL_REG,4,2     ## @RTL8366RB_MIB_CTRL_REG
	.comm	_EIO,4,2                        ## @EIO
	.comm	_RTL8366RB_MIB_CTRL_BUSY_MASK,4,2 ## @RTL8366RB_MIB_CTRL_BUSY_MASK
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_RTL8366RB_MIB_CTRL_RESET_MASK,4,2 ## @RTL8366RB_MIB_CTRL_RESET_MASK
	.no_dead_strip	_rtl8366rb_get_mib_counter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8366rb_get_mib_counter
_rtl8366rb_get_mib_counter:             ; @rtl8366rb_get_mib_counter
	.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
	mov	x19, x3
	mov	x22, x2
	mov	x20, x0
Lloh0:
	adrp	x8, _RTL8366RB_MIB_COUNTER_BASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTL8366RB_MIB_COUNTER_BASE@GOTPAGEOFF]
Lloh2:
	adrp	x9, _RTL8366RB_MIB_COUNTER_PORT_OFFSET@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RTL8366RB_MIB_COUNTER_PORT_OFFSET@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	madd	w8, w9, w1, w8
	ldr	w9, [x2, #8]
	add	w21, w8, w9
	ldr	w0, [x0]
	mov	x1, x21
	mov	w2, #0
	bl	_regmap_write
	cbnz	w0, LBB0_6
; %bb.1:
	ldr	w0, [x20]
Lloh6:
	adrp	x8, _RTL8366RB_MIB_CTRL_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RTL8366RB_MIB_CTRL_REG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	cbz	w0, LBB0_3
LBB0_2:
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
	ldr	w8, [sp, #12]
Lloh11:
	adrp	x9, _RTL8366RB_MIB_CTRL_BUSY_MASK@GOTPAGE
Lloh12:
	ldr	x9, [x9, _RTL8366RB_MIB_CTRL_BUSY_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.4:
Lloh14:
	adrp	x8, _EBUSY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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_7:
Lloh16:
	adrp	x9, _RTL8366RB_MIB_CTRL_RESET_MASK@GOTPAGE
Lloh17:
	ldr	x9, [x9, _RTL8366RB_MIB_CTRL_RESET_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.8:
	str	wzr, [x19]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.9:
	add	w22, w8, #1
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	add	w8, w21, w22
	sub	w1, w8, #2
	add	x2, sp, #12
	bl	_regmap_read
	cbnz	w0, LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x19]
	ldrh	w9, [sp, #12]
	bfi	w9, w8, #16, #16
	str	w9, [x19]
	sub	w22, w22, #1
	cmp	w22, #1
	b.hi	LBB0_10
	b	LBB0_6
LBB0_12:
	mov	w0, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_RTL8366RB_MIB_COUNTER_BASE,4,2 ; @RTL8366RB_MIB_COUNTER_BASE
	.comm	_RTL8366RB_MIB_COUNTER_PORT_OFFSET,4,2 ; @RTL8366RB_MIB_COUNTER_PORT_OFFSET
	.comm	_RTL8366RB_MIB_CTRL_REG,4,2     ; @RTL8366RB_MIB_CTRL_REG
	.comm	_EIO,4,2                        ; @EIO
	.comm	_RTL8366RB_MIB_CTRL_BUSY_MASK,4,2 ; @RTL8366RB_MIB_CTRL_BUSY_MASK
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_RTL8366RB_MIB_CTRL_RESET_MASK,4,2 ; @RTL8366RB_MIB_CTRL_RESET_MASK
	.no_dead_strip	_rtl8366rb_get_mib_counter
.subsections_via_symbols
