	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cw1200_tx_h_rate_policy
_cw1200_tx_h_rate_policy:               ## @cw1200_tx_h_rate_policy
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	$0, -28(%rbp)
	movq	8(%rsi), %rax
	movq	(%rax), %rsi
	movq	_IEEE80211_TX_MAX_RATES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-28(%rbp), %rcx
	callq	_tx_policy_get
	movl	%eax, 16(%rbx)
	movq	_CW1200_INVALID_RATE_ID@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_2:
	shll	$4, %eax
	orl	%eax, (%r14)
	movq	8(%rbx), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_cw1200_get_tx_rate
	movq	%rax, (%rbx)
	movl	4(%rax), %ecx
	movl	%ecx, 8(%r14)
	movq	_IEEE80211_TX_RC_MCS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_7
## %bb.3:
	leaq	8(%r15), %rdi
	callq	_cw1200_ht_greenfield
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:
	movq	_WSM_HT_TX_MIXED@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_WSM_HT_TX_GREENFIELD@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %edi
	callq	___cpu_to_le32
	orl	%eax, 4(%r14)
LBB0_7:
	xorl	%ebx, %ebx
	cmpl	$0, -28(%rbp)
	je	LBB0_10
## %bb.8:
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	movq	%r15, %rdi
	callq	_wsm_lock_tx_async
	movq	%r15, %rdi
	callq	_cw1200_tx_queues_lock
	movl	4(%r15), %edi
	movq	%r15, %rsi
	callq	_queue_work
	testq	%rax, %rax
	jg	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	callq	_cw1200_tx_queues_unlock
	movq	%r15, %rdi
	callq	_wsm_unlock_tx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_TX_MAX_RATES,4,2     ## @IEEE80211_TX_MAX_RATES
	.comm	_CW1200_INVALID_RATE_ID,4,2     ## @CW1200_INVALID_RATE_ID
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_IEEE80211_TX_RC_MCS,4,2        ## @IEEE80211_TX_RC_MCS
	.comm	_WSM_HT_TX_GREENFIELD,4,2       ## @WSM_HT_TX_GREENFIELD
	.comm	_WSM_HT_TX_MIXED,4,2            ## @WSM_HT_TX_MIXED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[TX] TX policy renew.\n"

	.no_dead_strip	_cw1200_tx_h_rate_policy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cw1200_tx_h_rate_policy
_cw1200_tx_h_rate_policy:               ; @cw1200_tx_h_rate_policy
	.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, x2
	mov	x21, x1
	mov	x19, x0
	str	wzr, [sp, #12]
	ldr	x8, [x1, #8]
	ldr	x1, [x8]
Lloh0:
	adrp	x8, _IEEE80211_TX_MAX_RATES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_TX_MAX_RATES@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x3, sp, #12
	bl	_tx_policy_get
	str	w0, [x21, #16]
Lloh3:
	adrp	x8, _CW1200_INVALID_RATE_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CW1200_INVALID_RATE_ID@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _EFAULT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_2:
	ldr	w8, [x20]
	orr	w8, w8, w0, lsl #4
	str	w8, [x20]
	ldr	x8, [x21, #8]
	ldr	x1, [x8]
	mov	x0, x19
	bl	_cw1200_get_tx_rate
	str	x0, [x21]
	ldp	w9, w8, [x0]
	str	w8, [x20, #8]
Lloh9:
	adrp	x8, _IEEE80211_TX_RC_MCS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IEEE80211_TX_RC_MCS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w9
	b.eq	LBB0_4
; %bb.3:
	add	x0, x19, #8
	bl	_cw1200_ht_greenfield
Lloh12:
	adrp	x8, _WSM_HT_TX_MIXED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WSM_HT_TX_MIXED@GOTPAGEOFF]
Lloh14:
	adrp	x9, _WSM_HT_TX_GREENFIELD@GOTPAGE
Lloh15:
	ldr	x9, [x9, _WSM_HT_TX_GREENFIELD@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	w0, [x8]
	bl	___cpu_to_le32
	ldr	w8, [x20, #4]
	orr	w8, w8, w0
	str	w8, [x20, #4]
LBB0_4:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_7
; %bb.5:
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	mov	x0, x19
	bl	_wsm_lock_tx_async
	mov	x0, x19
	bl	_cw1200_tx_queues_lock
	ldr	w0, [x19, #4]
	mov	x1, x19
	bl	_queue_work
	cmp	x0, #0
	b.gt	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_cw1200_tx_queues_unlock
	mov	x0, x19
	bl	_wsm_unlock_tx
LBB0_7:
	mov	w0, #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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_TX_MAX_RATES,4,2     ; @IEEE80211_TX_MAX_RATES
	.comm	_CW1200_INVALID_RATE_ID,4,2     ; @CW1200_INVALID_RATE_ID
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_IEEE80211_TX_RC_MCS,4,2        ; @IEEE80211_TX_RC_MCS
	.comm	_WSM_HT_TX_GREENFIELD,4,2       ; @WSM_HT_TX_GREENFIELD
	.comm	_WSM_HT_TX_MIXED,4,2            ; @WSM_HT_TX_MIXED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[TX] TX policy renew.\n"

	.no_dead_strip	_cw1200_tx_h_rate_policy
.subsections_via_symbols
