	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_wmi_create_pstream_cmd  ## -- Begin function ath6kl_wmi_create_pstream_cmd
	.p2align	4, 0x90
_ath6kl_wmi_create_pstream_cmd:         ## @ath6kl_wmi_create_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdx), %eax
	cmpl	$7, %eax
	jg	LBB0_12
## %bb.1:
	movq	%rdx, %rbx
	movq	_up_to_ac@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andl	$7, %eax
	movl	(%rcx,%rax,4), %eax
	cmpl	4(%rdx), %eax
	jne	LBB0_12
## %bb.2:
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	8(%rbx), %rax
	movq	_UPLINK_TRAFFIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.3:
	movq	_DNLINK_TRAFFIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	_BIDIR_TRAFFIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
LBB0_5:
	movq	16(%rbx), %rax
	movq	_TRAFFIC_TYPE_APERIODIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	movq	_TRAFFIC_TYPE_PERIODIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
LBB0_7:
	movq	24(%rbx), %rax
	movq	_DISABLE_FOR_THIS_AC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.8:
	movq	_ENABLE_FOR_THIS_AC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.9:
	movq	_ENABLE_FOR_ALL_AC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
LBB0_10:
	movl	32(%rbx), %eax
	movq	_WMI_IMPLICIT_PSTREAM@GOTPCREL(%rip), %r13
	cmpl	(%r13), %eax
	je	LBB0_14
## %bb.11:
	movq	_WMI_MAX_THINSTREAM@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_14
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_13:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	40(%rbx), %edi
	callq	_le32_to_cpu
	cltq
	imulq	$1125899907, %rax, %rdx         ## imm = 0x431BDE83
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$50, %rdx
	addl	%eax, %edx
	movl	36(%rbx), %r12d
	xorl	%eax, %eax
	cmpl	%edx, %r12d
	jl	LBB0_16
## %bb.15:
	addl	%r12d, %r12d
	movq	_ATH6KL_DBG_WMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%r12d, %ecx
	callq	_ath6kl_dbg
	movl	%r12d, %eax
LBB0_16:
	movl	%eax, 36(%rbx)
	movl	$48, %edi
	callq	_ath6kl_wmi_get_new_buf
	testq	%rax, %rax
	je	LBB0_17
## %bb.18:
	movq	%rax, %r12
	movq	_ATH6KL_DBG_WMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%rbx), %edx
	movl	32(%rbx), %ecx
	leaq	L_.str.1(%rip), %rsi
	callq	_ath6kl_dbg
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rdi
	movq	%rbx, %rsi
	movl	$48, %edx
	callq	_memcpy
	movl	32(%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r13), %r13d
	leaq	20(%r15), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_bh
	movslq	4(%rbx), %rax
	movl	$1, %r12d
	movl	%eax, %ecx
	shll	%cl, %r12d
	movl	$1, %edx
	movl	(%r15), %ecx
	cmpl	%r13d, -44(%rbp)                ## 4-byte Folded Reload
	jne	LBB0_20
## %bb.19:
	movl	%r12d, %eax
	orl	%ecx, %eax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ecx, %r13d
	jmp	LBB0_21
LBB0_17:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_20:
	movl	%ecx, %r13d
	movb	32(%rbx), %cl
	shll	%cl, %edx
	movq	8(%r15), %rcx
	orl	%edx, (%rcx,%rax,4)
	movb	4(%rbx), %cl
	movl	(%r15), %eax
	btsl	%ecx, %eax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_21:
	movl	%eax, (%r15)
	callq	_spin_unlock_bh
	testl	%r13d, %r12d
	jne	LBB0_23
## %bb.22:
	movl	16(%r15), %edi
	movl	4(%rbx), %esi
	movl	$1, %edx
	callq	_ath6kl_indicate_tx_activity
LBB0_23:
	movq	_WMI_CREATE_PSTREAM_CMDID@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_NO_SYNC_WMIFLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath6kl_wmi_cmd_send            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_up_to_ac,8,3                   ## @up_to_ac
	.comm	_UPLINK_TRAFFIC,8,3             ## @UPLINK_TRAFFIC
	.comm	_DNLINK_TRAFFIC,8,3             ## @DNLINK_TRAFFIC
	.comm	_BIDIR_TRAFFIC,8,3              ## @BIDIR_TRAFFIC
	.comm	_TRAFFIC_TYPE_APERIODIC,8,3     ## @TRAFFIC_TYPE_APERIODIC
	.comm	_TRAFFIC_TYPE_PERIODIC,8,3      ## @TRAFFIC_TYPE_PERIODIC
	.comm	_DISABLE_FOR_THIS_AC,8,3        ## @DISABLE_FOR_THIS_AC
	.comm	_ENABLE_FOR_THIS_AC,8,3         ## @ENABLE_FOR_THIS_AC
	.comm	_ENABLE_FOR_ALL_AC,8,3          ## @ENABLE_FOR_ALL_AC
	.comm	_WMI_IMPLICIT_PSTREAM,4,2       ## @WMI_IMPLICIT_PSTREAM
	.comm	_WMI_MAX_THINSTREAM,4,2         ## @WMI_MAX_THINSTREAM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ATH6KL_DBG_WMI,4,2             ## @ATH6KL_DBG_WMI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TSRS IE enabled::MinPhy %x->NominalPhy ===> %x\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"sending create_pstream_cmd: ac=%d  tsid:%d\n"

	.comm	_WMI_CREATE_PSTREAM_CMDID,4,2   ## @WMI_CREATE_PSTREAM_CMDID
	.comm	_NO_SYNC_WMIFLAG,4,2            ## @NO_SYNC_WMIFLAG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_wmi_create_pstream_cmd  ; -- Begin function ath6kl_wmi_create_pstream_cmd
	.p2align	2
_ath6kl_wmi_create_pstream_cmd:         ; @ath6kl_wmi_create_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
	ldr	w8, [x2]
	cmp	w8, #7
	b.gt	LBB0_9
; %bb.1:
	mov	x21, x2
Lloh0:
	adrp	x9, _up_to_ac@GOTPAGE
Lloh1:
	ldr	x9, [x9, _up_to_ac@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	and	x8, x8, #0x7
	ldr	w8, [x9, x8, lsl #2]
	ldr	w9, [x2, #4]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.2:
	ldr	x8, [x21, #8]
Lloh3:
	adrp	x9, _UPLINK_TRAFFIC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _UPLINK_TRAFFIC@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _DNLINK_TRAFFIC@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DNLINK_TRAFFIC@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
Lloh9:
	adrp	x11, _BIDIR_TRAFFIC@GOTPAGE
Lloh10:
	ldr	x11, [x11, _BIDIR_TRAFFIC@GOTPAGEOFF]
Lloh11:
	ldr	x11, [x11]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	b.ne	LBB0_9
; %bb.3:
	ldr	x8, [x21, #16]
Lloh12:
	adrp	x9, _TRAFFIC_TYPE_APERIODIC@GOTPAGE
Lloh13:
	ldr	x9, [x9, _TRAFFIC_TYPE_APERIODIC@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
Lloh15:
	adrp	x10, _TRAFFIC_TYPE_PERIODIC@GOTPAGE
Lloh16:
	ldr	x10, [x10, _TRAFFIC_TYPE_PERIODIC@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_9
; %bb.4:
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x21, #24]
Lloh18:
	adrp	x9, _DISABLE_FOR_THIS_AC@GOTPAGE
Lloh19:
	ldr	x9, [x9, _DISABLE_FOR_THIS_AC@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.5:
Lloh21:
	adrp	x9, _ENABLE_FOR_THIS_AC@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ENABLE_FOR_THIS_AC@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.6:
Lloh24:
	adrp	x9, _ENABLE_FOR_ALL_AC@GOTPAGE
Lloh25:
	ldr	x9, [x9, _ENABLE_FOR_ALL_AC@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
LBB0_7:
	ldr	w8, [x21, #32]
Lloh27:
	adrp	x23, _WMI_IMPLICIT_PSTREAM@GOTPAGE
Lloh28:
	ldr	x23, [x23, _WMI_IMPLICIT_PSTREAM@GOTPAGEOFF]
	ldr	w9, [x23]
	cmp	w8, w9
	b.eq	LBB0_11
; %bb.8:
Lloh29:
	adrp	x9, _WMI_MAX_THINSTREAM@GOTPAGE
Lloh30:
	ldr	x9, [x9, _WMI_MAX_THINSTREAM@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_11
LBB0_9:
Lloh32:
	adrp	x8, _EINVAL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
	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
LBB0_11:
	ldr	w0, [x21, #40]
	bl	_le32_to_cpu
	mov	w8, #56963
	movk	w8, #17179, lsl #16
	smull	x8, w0, w8
	lsr	x9, x8, #63
	asr	x10, x8, #50
	ldr	w8, [x21, #36]
	add	w2, w10, w9
	cmp	w8, w2
Lloh34:
	adrp	x24, _ATH6KL_DBG_WMI@GOTPAGE
Lloh35:
	ldr	x24, [x24, _ATH6KL_DBG_WMI@GOTPAGEOFF]
	b.ge	LBB0_13
; %bb.12:
	mov	w22, #0
	b	LBB0_14
LBB0_13:
	lsl	w22, w8, #1
	ldr	w0, [x24]
Lloh36:
	adrp	x1, l_.str@PAGE
Lloh37:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x22
	bl	_ath6kl_dbg
LBB0_14:
	str	w22, [x21, #36]
	mov	w0, #48
	bl	_ath6kl_wmi_get_new_buf
	cbz	x0, LBB0_17
; %bb.15:
	mov	x22, x0
	ldr	w0, [x24]
	ldr	w2, [x21, #4]
	ldr	w3, [x21, #32]
Lloh38:
	adrp	x1, l_.str.1@PAGE
Lloh39:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_ath6kl_dbg
	ldr	x0, [x22]
	mov	x1, x21
	mov	w2, #48
	bl	_memcpy
	ldr	w25, [x21, #32]
	ldr	w26, [x23]
	add	x23, x20, #20
	mov	x0, x23
	bl	_spin_lock_bh
	ldr	w9, [x20]
	ldr	w10, [x21, #4]
	mov	w8, #1
	lsl	w11, w8, w10
	and	w24, w11, w9
	cmp	w25, w26
	b.ne	LBB0_18
; %bb.16:
	orr	w8, w11, w9
	b	LBB0_19
LBB0_17:
Lloh40:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_10
LBB0_18:
	sxtw	x9, w10
	ldr	w10, [x21, #32]
	lsl	w10, w8, w10
	ldr	x11, [x20, #8]
	lsl	x9, x9, #2
	ldr	w12, [x11, x9]
	orr	w10, w12, w10
	str	w10, [x11, x9]
	ldr	w9, [x21, #4]
	lsl	w8, w8, w9
	ldr	w9, [x20]
	orr	w8, w9, w8
LBB0_19:
	str	w8, [x20]
	mov	x0, x23
	bl	_spin_unlock_bh
	cbnz	w24, LBB0_21
; %bb.20:
	ldr	w0, [x20, #16]
	ldr	w1, [x21, #4]
	mov	w2, #1
	bl	_ath6kl_indicate_tx_activity
LBB0_21:
Lloh42:
	adrp	x8, _WMI_CREATE_PSTREAM_CMDID@GOTPAGE
Lloh43:
	ldr	x8, [x8, _WMI_CREATE_PSTREAM_CMDID@GOTPAGEOFF]
Lloh44:
	ldr	w3, [x8]
Lloh45:
	adrp	x8, _NO_SYNC_WMIFLAG@GOTPAGE
Lloh46:
	ldr	x8, [x8, _NO_SYNC_WMIFLAG@GOTPAGEOFF]
Lloh47:
	ldr	w4, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	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
	b	_ath6kl_wmi_cmd_send
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_up_to_ac,8,3                   ; @up_to_ac
	.comm	_UPLINK_TRAFFIC,8,3             ; @UPLINK_TRAFFIC
	.comm	_DNLINK_TRAFFIC,8,3             ; @DNLINK_TRAFFIC
	.comm	_BIDIR_TRAFFIC,8,3              ; @BIDIR_TRAFFIC
	.comm	_TRAFFIC_TYPE_APERIODIC,8,3     ; @TRAFFIC_TYPE_APERIODIC
	.comm	_TRAFFIC_TYPE_PERIODIC,8,3      ; @TRAFFIC_TYPE_PERIODIC
	.comm	_DISABLE_FOR_THIS_AC,8,3        ; @DISABLE_FOR_THIS_AC
	.comm	_ENABLE_FOR_THIS_AC,8,3         ; @ENABLE_FOR_THIS_AC
	.comm	_ENABLE_FOR_ALL_AC,8,3          ; @ENABLE_FOR_ALL_AC
	.comm	_WMI_IMPLICIT_PSTREAM,4,2       ; @WMI_IMPLICIT_PSTREAM
	.comm	_WMI_MAX_THINSTREAM,4,2         ; @WMI_MAX_THINSTREAM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ATH6KL_DBG_WMI,4,2             ; @ATH6KL_DBG_WMI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TSRS IE enabled::MinPhy %x->NominalPhy ===> %x\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"sending create_pstream_cmd: ac=%d  tsid:%d\n"

	.comm	_WMI_CREATE_PSTREAM_CMDID,4,2   ; @WMI_CREATE_PSTREAM_CMDID
	.comm	_NO_SYNC_WMIFLAG,4,2            ; @NO_SYNC_WMIFLAG
.subsections_via_symbols
