	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl88e_dm_check_edca_turbo
_rtl88e_dm_check_edca_turbo:            ## @rtl88e_dm_check_edca_turbo
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_rtl_priv
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_mac
	movq	32(%rbx), %rcx
	cmpq	%rcx, _rtl88e_dm_check_edca_turbo.last_bt_edca_ul(%rip)
	jne	LBB0_1
## %bb.2:
	movq	_rtl88e_dm_check_edca_turbo.last_bt_edca_dl(%rip), %rsi
	movq	40(%rbx), %rdx
	cmpq	%rdx, %rsi
	jne	LBB0_3
	jmp	LBB0_4
LBB0_1:
	movq	40(%rbx), %rdx
LBB0_3:
	movl	$0, 8(%rbx)
	movq	%rcx, _rtl88e_dm_check_edca_turbo.last_bt_edca_ul(%rip)
	movq	%rdx, _rtl88e_dm_check_edca_turbo.last_bt_edca_dl(%rip)
	movq	%rdx, %rsi
LBB0_4:
	testq	%rcx, %rcx
	movl	$6202411, %edx                  ## imm = 0x5EA42B
	cmovneq	%rcx, %rdx
	testq	%rsi, %rsi
	cmovneq	%rsi, %rdx
	movq	(%rax), %rax
	movq	_MAC80211_LINKED@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rax
	jne	LBB0_5
## %bb.6:
	orq	%rcx, %rsi
	jne	LBB0_9
## %bb.7:
	cmpl	$0, 12(%rbx)
	jne	LBB0_15
## %bb.8:
	cmpl	$0, 20(%rbx)
	je	LBB0_9
LBB0_15:
	cmpl	$0, 8(%rbx)
	je	LBB0_17
## %bb.16:
	movq	_AC0_BE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -20(%rbp)
	movq	24(%rbx), %rax
	movq	(%rax), %rax
	movq	_HW_VAR_AC_PARAM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-20(%rbp), %rdx
	movq	%r14, %rdi
	callq	*(%rax)
	movl	$0, 8(%rbx)
	jmp	LBB0_17
LBB0_5:
	movl	$0, 8(%rbx)
	jmp	LBB0_18
LBB0_9:
	movl	(%rbx), %ecx
	movl	4(%rbx), %esi
	subl	_rtl88e_dm_check_edca_turbo.last_txok_cnt(%rip), %ecx
	subl	_rtl88e_dm_check_edca_turbo.last_rxok_cnt(%rip), %esi
	shll	$2, %ecx
	movl	16(%rbx), %eax
	cmpl	%ecx, %esi
	jle	LBB0_11
## %bb.10:
	movl	$1, %r14d
	movl	$6202411, %edx                  ## imm = 0x5EA42B
	testl	%eax, %eax
	jne	LBB0_12
	jmp	LBB0_13
LBB0_11:
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jne	LBB0_13
LBB0_12:
	cmpl	$0, 8(%rbx)
	jne	LBB0_14
LBB0_13:
	movq	_REG_EDCA_BE_PARAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rtl_write_dword
	movl	%r14d, 16(%rbx)
LBB0_14:
	movl	$1, 8(%rbx)
LBB0_17:
	movl	$0, 12(%rbx)
	movl	(%rbx), %eax
	movl	%eax, _rtl88e_dm_check_edca_turbo.last_txok_cnt(%rip)
	movl	4(%rbx), %eax
	movl	%eax, _rtl88e_dm_check_edca_turbo.last_rxok_cnt(%rip)
LBB0_18:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_rtl88e_dm_check_edca_turbo.last_txok_cnt,4,2 ## @rtl88e_dm_check_edca_turbo.last_txok_cnt
.zerofill __DATA,__bss,_rtl88e_dm_check_edca_turbo.last_rxok_cnt,4,2 ## @rtl88e_dm_check_edca_turbo.last_rxok_cnt
.zerofill __DATA,__bss,_rtl88e_dm_check_edca_turbo.last_bt_edca_ul,8,3 ## @rtl88e_dm_check_edca_turbo.last_bt_edca_ul
.zerofill __DATA,__bss,_rtl88e_dm_check_edca_turbo.last_bt_edca_dl,8,3 ## @rtl88e_dm_check_edca_turbo.last_bt_edca_dl
	.comm	_MAC80211_LINKED,8,3            ## @MAC80211_LINKED
	.comm	_REG_EDCA_BE_PARAM,4,2          ## @REG_EDCA_BE_PARAM
	.comm	_AC0_BE,4,2                     ## @AC0_BE
	.comm	_HW_VAR_AC_PARAM,4,2            ## @HW_VAR_AC_PARAM
	.no_dead_strip	_rtl88e_dm_check_edca_turbo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl88e_dm_check_edca_turbo
_rtl88e_dm_check_edca_turbo:            ; @rtl88e_dm_check_edca_turbo
	.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	x20, x0
	bl	_rtl_priv
	mov	x19, x0
	mov	x0, x20
	bl	_rtl_priv
	bl	_rtl_mac
	adrp	x9, _rtl88e_dm_check_edca_turbo.last_bt_edca_ul@PAGE
	ldr	x10, [x9, _rtl88e_dm_check_edca_turbo.last_bt_edca_ul@PAGEOFF]
	ldr	x8, [x19, #32]
	adrp	x11, _rtl88e_dm_check_edca_turbo.last_bt_edca_dl@PAGE
	cmp	x10, x8
	b.ne	LBB0_2
; %bb.1:
	ldr	x10, [x11, _rtl88e_dm_check_edca_turbo.last_bt_edca_dl@PAGEOFF]
	ldr	x12, [x19, #40]
	cmp	x10, x12
	b.ne	LBB0_3
	b	LBB0_4
LBB0_2:
	ldr	x12, [x19, #40]
LBB0_3:
	str	wzr, [x19, #8]
	str	x8, [x9, _rtl88e_dm_check_edca_turbo.last_bt_edca_ul@PAGEOFF]
	mov	x10, x12
	str	x12, [x11, _rtl88e_dm_check_edca_turbo.last_bt_edca_dl@PAGEOFF]
LBB0_4:
	mov	w2, #42027
	movk	w2, #94, lsl #16
	cmp	x8, #0
	csel	x9, x2, x8, eq
	cmp	x10, #0
	csel	x9, x9, x10, eq
	ldr	x11, [x0]
Lloh0:
	adrp	x12, _MAC80211_LINKED@GOTPAGE
Lloh1:
	ldr	x12, [x12, _MAC80211_LINKED@GOTPAGEOFF]
Lloh2:
	ldr	x12, [x12]
	cmp	x11, x12
	b.ne	LBB0_10
; %bb.5:
	adrp	x21, _rtl88e_dm_check_edca_turbo.last_txok_cnt@PAGE
	adrp	x22, _rtl88e_dm_check_edca_turbo.last_rxok_cnt@PAGE
	orr	x8, x10, x8
	cbnz	x8, LBB0_11
; %bb.6:
	ldr	w8, [x19, #12]
	cbnz	w8, LBB0_8
; %bb.7:
	ldr	w8, [x19, #20]
	cbz	w8, LBB0_11
LBB0_8:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_19
; %bb.9:
Lloh3:
	adrp	x8, _AC0_BE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AC0_BE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #12]
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _HW_VAR_AC_PARAM@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HW_VAR_AC_PARAM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
	add	x2, sp, #12
	mov	x0, x20
	blr	x8
	str	wzr, [x19, #8]
	b	LBB0_19
LBB0_10:
	str	wzr, [x19, #8]
	b	LBB0_20
LBB0_11:
	ldr	w8, [x21, _rtl88e_dm_check_edca_turbo.last_txok_cnt@PAGEOFF]
	ldp	w10, w11, [x19]
	sub	w10, w10, w8
	ldr	w8, [x22, _rtl88e_dm_check_edca_turbo.last_rxok_cnt@PAGEOFF]
	sub	w11, w11, w8
	ldr	w8, [x19, #16]
	cmp	w11, w10, lsl #2
	b.le	LBB0_15
; %bb.12:
	cbz	w8, LBB0_14
; %bb.13:
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_18
LBB0_14:
	mov	w20, #1
	b	LBB0_17
LBB0_15:
	cbz	w8, LBB0_21
LBB0_16:
	mov	w20, #0
	mov	x2, x9
LBB0_17:
Lloh9:
	adrp	x8, _REG_EDCA_BE_PARAM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_EDCA_BE_PARAM@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rtl_write_dword
	str	w20, [x19, #16]
LBB0_18:
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_19:
	str	wzr, [x19, #12]
	ldp	w8, w9, [x19]
	str	w8, [x21, _rtl88e_dm_check_edca_turbo.last_txok_cnt@PAGEOFF]
	str	w9, [x22, _rtl88e_dm_check_edca_turbo.last_rxok_cnt@PAGEOFF]
LBB0_20:
	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_21:
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_18
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_rtl88e_dm_check_edca_turbo.last_txok_cnt,4,2 ; @rtl88e_dm_check_edca_turbo.last_txok_cnt
.zerofill __DATA,__bss,_rtl88e_dm_check_edca_turbo.last_rxok_cnt,4,2 ; @rtl88e_dm_check_edca_turbo.last_rxok_cnt
.zerofill __DATA,__bss,_rtl88e_dm_check_edca_turbo.last_bt_edca_ul,8,3 ; @rtl88e_dm_check_edca_turbo.last_bt_edca_ul
.zerofill __DATA,__bss,_rtl88e_dm_check_edca_turbo.last_bt_edca_dl,8,3 ; @rtl88e_dm_check_edca_turbo.last_bt_edca_dl
	.comm	_MAC80211_LINKED,8,3            ; @MAC80211_LINKED
	.comm	_REG_EDCA_BE_PARAM,4,2          ; @REG_EDCA_BE_PARAM
	.comm	_AC0_BE,4,2                     ; @AC0_BE
	.comm	_HW_VAR_AC_PARAM,4,2            ; @HW_VAR_AC_PARAM
	.no_dead_strip	_rtl88e_dm_check_edca_turbo
.subsections_via_symbols
