	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_wmi_delete_pstream_cmd  ## -- Begin function ath6kl_wmi_delete_pstream_cmd
	.p2align	4, 0x90
_ath6kl_wmi_delete_pstream_cmd:         ## @ath6kl_wmi_delete_pstream_cmd
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	_WMM_NUM_AC@GOTPCREL(%rip), %rax
	cmpq	%rdx, (%rax)
	jbe	LBB0_1
## %bb.2:
	movq	%rcx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r14
	movl	$16, %edi
	callq	_ath6kl_wmi_get_new_buf
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	movq	%r12, (%rax)
	movq	%r15, 8(%rax)
	leaq	16(%r14), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_bh
	movq	(%r14), %rax
	movl	(%rax,%r12,4), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_spin_unlock_bh
	movl	$1, %r13d
	movl	%r15d, %ecx
	shll	%cl, %r13d
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	btl	%r15d, %eax
	jae	LBB0_6
## %bb.7:
	movq	_ATH6KL_DBG_WMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_ath6kl_dbg
	movq	_WMI_DELETE_PSTREAM_CMDID@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_SYNC_BEFORE_WMIFLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_ath6kl_wmi_cmd_send
	movq	%r14, %r15
	movl	%eax, %ebx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_spin_lock_bh
	notl	%r13d
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rax
	andl	%r13d, (%rax,%r12,4)
	setne	%r15b
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	testb	%r15b, %r15b
	jne	LBB0_9
## %bb.8:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	12(%r14), %edi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_ath6kl_indicate_tx_activity
	movl	$-2, %eax
	movl	%r12d, %ecx
	roll	%cl, %eax
	andl	%eax, 8(%r14)
	jmp	LBB0_9
LBB0_1:
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	callq	_ath6kl_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_6:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_kfree_skb
	movq	_ATH6KL_DBG_WMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdx
	movq	%r12, %rcx
	callq	_ath6kl_dbg
	movq	_ENODATA@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WMM_NUM_AC,8,3                 ## @WMM_NUM_AC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid traffic class: %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ATH6KL_DBG_WMI,4,2             ## @ATH6KL_DBG_WMI
L_.str.1:                               ## @.str.1
	.asciz	"TSID %d doesn't exist for traffic class: %d\n"

	.comm	_ENODATA,4,2                    ## @ENODATA
L_.str.2:                               ## @.str.2
	.asciz	"sending delete_pstream_cmd: traffic class: %d tsid=%d\n"

	.comm	_WMI_DELETE_PSTREAM_CMDID,4,2   ## @WMI_DELETE_PSTREAM_CMDID
	.comm	_SYNC_BEFORE_WMIFLAG,4,2        ## @SYNC_BEFORE_WMIFLAG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_wmi_delete_pstream_cmd  ; -- Begin function ath6kl_wmi_delete_pstream_cmd
	.p2align	2
_ath6kl_wmi_delete_pstream_cmd:         ; @ath6kl_wmi_delete_pstream_cmd
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
Lloh0:
	adrp	x8, _WMM_NUM_AC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WMM_NUM_AC@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x2
	b.ls	LBB0_5
; %bb.1:
	mov	x21, x3
	mov	x22, x1
	mov	x20, x0
	mov	w0, #16
	bl	_ath6kl_wmi_get_new_buf
	cbz	x0, LBB0_6
; %bb.2:
	mov	x24, x0
	ldr	x8, [x0]
	stp	x19, x21, [x8]
	add	x23, x20, #16
	mov	x0, x23
	bl	_spin_lock_bh
	ldr	x8, [x20]
	ldr	w26, [x8, x19, lsl #2]
	mov	x0, x23
	bl	_spin_unlock_bh
	mov	w8, #1
	lsl	w25, w8, w21
	tst	w26, w25
	b.eq	LBB0_7
; %bb.3:
Lloh3:
	adrp	x8, _ATH6KL_DBG_WMI@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATH6KL_DBG_WMI@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	mov	x3, x21
	bl	_ath6kl_dbg
Lloh8:
	adrp	x8, _WMI_DELETE_PSTREAM_CMDID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WMI_DELETE_PSTREAM_CMDID@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
Lloh11:
	adrp	x8, _SYNC_BEFORE_WMIFLAG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SYNC_BEFORE_WMIFLAG@GOTPAGEOFF]
Lloh13:
	ldr	w4, [x8]
	mov	x0, x20
	mov	x1, x22
	mov	x2, x24
	bl	_ath6kl_wmi_cmd_send
	mov	x21, x0
	mov	x0, x23
	bl	_spin_lock_bh
	ldr	x8, [x20]
	lsl	x9, x19, #2
	ldr	w10, [x8, x9]
	bic	w22, w10, w25
	str	w22, [x8, x9]
	mov	x0, x23
	bl	_spin_unlock_bh
	cbnz	w22, LBB0_9
; %bb.4:
	ldr	w0, [x20, #12]
	mov	x1, x19
	mov	w2, #0
	bl	_ath6kl_indicate_tx_activity
	mov	w8, #1
	lsl	w8, w8, w19
	ldr	w9, [x20, #8]
	bic	w8, w9, w8
	str	w8, [x20, #8]
	b	LBB0_9
LBB0_5:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_ath6kl_err
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
	mov	x0, x24
	bl	_dev_kfree_skb
Lloh20:
	adrp	x8, _ATH6KL_DBG_WMI@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ATH6KL_DBG_WMI@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	mov	x3, x19
	bl	_ath6kl_dbg
Lloh25:
	adrp	x8, _ENODATA@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_WMM_NUM_AC,8,3                 ; @WMM_NUM_AC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid traffic class: %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ATH6KL_DBG_WMI,4,2             ; @ATH6KL_DBG_WMI
l_.str.1:                               ; @.str.1
	.asciz	"TSID %d doesn't exist for traffic class: %d\n"

	.comm	_ENODATA,4,2                    ; @ENODATA
l_.str.2:                               ; @.str.2
	.asciz	"sending delete_pstream_cmd: traffic class: %d tsid=%d\n"

	.comm	_WMI_DELETE_PSTREAM_CMDID,4,2   ; @WMI_DELETE_PSTREAM_CMDID
	.comm	_SYNC_BEFORE_WMIFLAG,4,2        ; @SYNC_BEFORE_WMIFLAG
.subsections_via_symbols
