	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl92ee_rx_desc_buff_remained_cnt ## -- Begin function rtl92ee_rx_desc_buff_remained_cnt
	.p2align	4, 0x90
_rtl92ee_rx_desc_buff_remained_cnt:     ## @rtl92ee_rx_desc_buff_remained_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	%rsi, %r14
	movq	%rdi, %rbx
	callq	_rtl_pcipriv
	movl	%eax, %edi
	callq	_rtl_pcidev
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_rtl_priv
	movq	%rax, %r12
	movq	_REG_RXQ_TXBD_IDX@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rax, %rdi
	callq	_rtl_read_dword
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, %ebx
	andl	$2047, %ebx                     ## imm = 0x7FF
	movq	(%r15), %rcx
	cmpq	%rbx, (%rcx,%r14,8)
	jne	LBB0_3
## %bb.1:
	shrl	$16, %eax
	andl	$2047, %eax                     ## imm = 0x7FF
	je	LBB0_4
LBB0_2:
	movb	$1, _rtl92ee_rx_desc_buff_remained_cnt.start_rx(%rip)
	jmp	LBB0_5
LBB0_3:
	movq	_COMP_RXDESC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_DBG_DMESG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r12, %rdi
	movq	%rbx, %r8
	movl	%eax, %r9d
	callq	_RT_TRACE
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_rtl_read_dword
	movl	%eax, %ebx
	sarl	$16, %eax
	andl	$2047, %ebx                     ## imm = 0x7FF
	andl	$2047, %eax                     ## imm = 0x7FF
	jne	LBB0_2
LBB0_4:
	cmpb	$1, _rtl92ee_rx_desc_buff_remained_cnt.start_rx(%rip)
	jne	LBB0_8
LBB0_5:
	movq	_RTL_PCI_MAX_RX_COUNT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_calc_fifo_space
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	(%r15), %rcx
	movq	%rbx, (%rcx,%r14,8)
	jmp	LBB0_9
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_rtl92ee_rx_desc_buff_remained_cnt.start_rx,1,2 ## @rtl92ee_rx_desc_buff_remained_cnt.start_rx
	.comm	_REG_RXQ_TXBD_IDX,4,2           ## @REG_RXQ_TXBD_IDX
	.comm	_COMP_RXDESC,4,2                ## @COMP_RXDESC
	.comm	_DBG_DMESG,4,2                  ## @DBG_DMESG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"!!!write point is 0x%x, reg 0x3B4 value is 0x%x\n"

	.comm	_RTL_PCI_MAX_RX_COUNT,4,2       ## @RTL_PCI_MAX_RX_COUNT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl92ee_rx_desc_buff_remained_cnt ; -- Begin function rtl92ee_rx_desc_buff_remained_cnt
	.p2align	2
_rtl92ee_rx_desc_buff_remained_cnt:     ; @rtl92ee_rx_desc_buff_remained_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, x1
	mov	x21, x0
	bl	_rtl_pcipriv
	bl	_rtl_pcidev
	mov	x20, x0
	mov	x0, x21
	bl	_rtl_priv
	mov	x22, x0
Lloh0:
	adrp	x23, _REG_RXQ_TXBD_IDX@GOTPAGE
Lloh1:
	ldr	x23, [x23, _REG_RXQ_TXBD_IDX@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_rtl_read_dword
	mov	x5, x0
	and	w21, w0, #0x7ff
	ldr	x8, [x20]
	ldr	x8, [x8, x19, lsl #3]
	cmp	x8, x21
	b.ne	LBB0_3
; %bb.1:
	lsr	w8, w5, #16
	ands	w0, w8, #0x7ff
	b.eq	LBB0_4
LBB0_2:
	mov	w8, #1
	adrp	x9, _rtl92ee_rx_desc_buff_remained_cnt.start_rx@PAGE
	strb	w8, [x9, _rtl92ee_rx_desc_buff_remained_cnt.start_rx@PAGEOFF]
	b	LBB0_5
LBB0_3:
Lloh2:
	adrp	x8, _COMP_RXDESC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _COMP_RXDESC@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _DBG_DMESG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DBG_DMESG@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x3, l_.str@PAGE
Lloh9:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x22
	mov	x4, x21
	bl	_RT_TRACE
	ldr	w1, [x23]
	mov	x0, x22
	bl	_rtl_read_dword
	asr	w8, w0, #16
	and	w21, w0, #0x7ff
	ands	w0, w8, #0x7ff
	b.ne	LBB0_2
LBB0_4:
	adrp	x8, _rtl92ee_rx_desc_buff_remained_cnt.start_rx@PAGE
	ldrb	w8, [x8, _rtl92ee_rx_desc_buff_remained_cnt.start_rx@PAGEOFF]
	cmp	w8, #1
	b.ne	LBB0_7
LBB0_5:
Lloh10:
	adrp	x8, _RTL_PCI_MAX_RX_COUNT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RTL_PCI_MAX_RX_COUNT@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x1, x21
	bl	_calc_fifo_space
	cbz	x0, LBB0_8
; %bb.6:
	ldr	x8, [x20]
	str	x21, [x8, x19, lsl #3]
	b	LBB0_8
LBB0_7:
	mov	x0, #0
LBB0_8:
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_rtl92ee_rx_desc_buff_remained_cnt.start_rx,1,2 ; @rtl92ee_rx_desc_buff_remained_cnt.start_rx
	.comm	_REG_RXQ_TXBD_IDX,4,2           ; @REG_RXQ_TXBD_IDX
	.comm	_COMP_RXDESC,4,2                ; @COMP_RXDESC
	.comm	_DBG_DMESG,4,2                  ; @DBG_DMESG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"!!!write point is 0x%x, reg 0x3B4 value is 0x%x\n"

	.comm	_RTL_PCI_MAX_RX_COUNT,4,2       ; @RTL_PCI_MAX_RX_COUNT
.subsections_via_symbols
