	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl92ee_is_tx_desc_closed      ## -- Begin function rtl92ee_is_tx_desc_closed
	.p2align	4, 0x90
_rtl92ee_is_tx_desc_closed:             ## @rtl92ee_is_tx_desc_closed
	.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	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_rtl_pcipriv
	movl	%eax, %edi
	callq	_rtl_pcidev
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_rtl_priv
	movq	%rax, %r14
	movq	(%r13), %rbx
	movq	%r12, %rdi
	callq	_get_desc_addr_fr_q_idx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_rtl_read_dword
                                        ## kill: def $eax killed $eax def $rax
	shrl	$16, %eax
	andl	$4095, %eax                     ## imm = 0xFFF
	movq	%r12, %rcx
	shlq	$4, %rcx
	movq	%rax, (%rbx,%rcx)
	movq	8(%rbx,%rcx), %rcx
	cmpq	%rax, %rcx
	jle	LBB0_2
## %bb.1:
	cmpq	%r15, %rcx
	setle	%cl
	cmpq	%r15, %rax
	setg	%al
	orb	%cl, %al
	jmp	LBB0_5
LBB0_2:
	jge	LBB0_4
## %bb.3:
	cmpq	%r15, %rcx
	setl	%cl
	cmpq	%r15, %rax
	setg	%al
	andb	%cl, %al
	jmp	LBB0_5
LBB0_4:
	cmpq	%r15, %rax
	setne	%al
LBB0_5:
	movq	_BEACON_QUEUE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	cmpq	%r12, %rdx
	sete	%cl
	cmpq	$0, 8(%r14)
	jne	LBB0_7
## %bb.6:
	movq	(%r14), %rsi
	movq	_RF_CHANGE_BY_PS@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rsi
	jle	LBB0_12
LBB0_7:
	movl	$1, %ecx
	cmpq	%r12, %rdx
	jbe	LBB0_10
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	movq	%rax, _rtl92ee_is_tx_desc_closed.stop_report_cnt(%rip)
	movl	%ecx, %eax
	jmp	LBB0_11
LBB0_10:
	movl	$1, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	orb	%al, %cl
	movzbl	%cl, %eax
	cmpq	%r12, %rdx
	jbe	LBB0_11
## %bb.13:
	xorl	%ecx, %ecx
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movl	$1, %ecx
	jmp	LBB0_8
LBB0_15:
	movq	_rtl92ee_is_tx_desc_closed.stop_report_cnt(%rip), %rax
	incq	%rax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_rtl92ee_is_tx_desc_closed.stop_report_cnt,8,3 ## @rtl92ee_is_tx_desc_closed.stop_report_cnt
	.comm	_BEACON_QUEUE,8,3               ## @BEACON_QUEUE
	.comm	_RF_CHANGE_BY_PS,8,3            ## @RF_CHANGE_BY_PS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl92ee_is_tx_desc_closed      ; -- Begin function rtl92ee_is_tx_desc_closed
	.p2align	2
_rtl92ee_is_tx_desc_closed:             ; @rtl92ee_is_tx_desc_closed
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_rtl_pcipriv
	bl	_rtl_pcidev
	mov	x22, x0
	mov	x0, x20
	bl	_rtl_priv
	mov	x20, x0
	ldr	x22, [x22]
	mov	x0, x19
	bl	_get_desc_addr_fr_q_idx
	mov	x1, x0
	mov	x0, x20
	bl	_rtl_read_dword
	ubfx	w8, w0, #16, #12
	add	x9, x22, x19, lsl #4
	str	x8, [x9]
	ldr	x9, [x9, #8]
	cmp	x8, x21
	cset	w10, ne
	cmp	x9, x21
	ccmp	x8, x21, #4, lt
	cset	w11, gt
	cmp	x9, x8
	csel	w10, w10, w11, ge
	cmp	x9, x21
	ccmp	x8, x21, #0, gt
	cset	w11, gt
	cmp	x9, x8
	csel	w9, w10, w11, le
Lloh0:
	adrp	x8, _BEACON_QUEUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BEACON_QUEUE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x19
	cset	w10, eq
	ldr	x11, [x20, #8]
	cbnz	x11, LBB0_2
; %bb.1:
	ldr	x11, [x20]
Lloh3:
	adrp	x12, _RF_CHANGE_BY_PS@GOTPAGE
Lloh4:
	ldr	x12, [x12, _RF_CHANGE_BY_PS@GOTPAGEOFF]
Lloh5:
	ldr	x12, [x12]
	cmp	x11, x12
	b.le	LBB0_6
LBB0_2:
	mov	w0, #1
	cmp	x8, x19
	b.ls	LBB0_5
; %bb.3:
	mov	x8, #0
LBB0_4:
	adrp	x9, _rtl92ee_is_tx_desc_closed.stop_report_cnt@PAGE
	str	x8, [x9, _rtl92ee_is_tx_desc_closed.stop_report_cnt@PAGEOFF]
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	orr	w0, w10, w9
	cmp	x8, x19
	b.ls	LBB0_5
; %bb.7:
	tbz	w0, #0, LBB0_9
; %bb.8:
	mov	x8, #0
	mov	w0, #1
	b	LBB0_4
LBB0_9:
	mov	w0, #0
Lloh6:
	adrp	x8, _rtl92ee_is_tx_desc_closed.stop_report_cnt@PAGE
Lloh7:
	ldr	x8, [x8, _rtl92ee_is_tx_desc_closed.stop_report_cnt@PAGEOFF]
	add	x8, x8, #1
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdr	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_rtl92ee_is_tx_desc_closed.stop_report_cnt,8,3 ; @rtl92ee_is_tx_desc_closed.stop_report_cnt
	.comm	_BEACON_QUEUE,8,3               ; @BEACON_QUEUE
	.comm	_RF_CHANGE_BY_PS,8,3            ; @RF_CHANGE_BY_PS
.subsections_via_symbols
