	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_wmi_implicit_create_pstream ## -- Begin function ath6kl_wmi_implicit_create_pstream
	.p2align	4, 0x90
_ath6kl_wmi_implicit_create_pstream:    ## @ath6kl_wmi_implicit_create_pstream
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movl	%r8d, -64(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r14d
	movq	%rdx, %r12
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	_IP_ETHERTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%edi, %edi
	testq	%rdx, %rdx
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_2:
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movq	(%r12), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	(%rax), %edi
	callq	_le16_to_cpu
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_3
## %bb.4:
	movq	%r12, %r14
	movq	_WMI_DATA_HDR_META_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movq	_WMI_DATA_HDR_META_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	je	LBB0_6
## %bb.5:
	movq	_WMI_MAX_TX_META_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	movslq	%eax, %r12
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	32(%rax,%r12,4), %rbx
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	callq	_htons
	cmpq	%rax, %rbx
	movl	-60(%rbp), %r15d                ## 4-byte Reload
	jne	LBB0_8
## %bb.7:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r12,4), %rdi
	addq	$32, %rdi
	addq	$32, %rdi
	movl	%r15d, %esi
	callq	_ath6kl_wmi_determine_user_priority
	movl	%eax, %r15d
	jmp	LBB0_9
LBB0_3:
	xorl	%r15d, %r15d
	jmp	LBB0_11
LBB0_8:
	andl	$7, %r15d
LBB0_9:
	movq	8(%r14), %rbx
	movq	_ETH_P_PAE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be16
	cmpq	%rax, %rbx
	jne	LBB0_11
## %bb.10:
	movq	_WMI_VOICE_USER_PRIORITY@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_11:
	movq	(%r13), %rax
	movq	_WMM_AC_VI@GOTPCREL(%rip), %rcx
	movl	%r15d, %edx
	andl	$-2, %edx
	cmpl	$4, %edx
	movl	$1, %ebx
	cmovnel	%r15d, %ebx
	cmpq	(%rcx), %rax
	cmovnel	%r15d, %ebx
	movq	_up_to_ac@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	andl	$7, %ecx
	movl	(%rax,%rcx,4), %r15d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_wmi_data_hdr_set_up
	leaq	12(%r13), %r14
	movq	%r14, %rdi
	callq	_spin_lock_bh
	movl	8(%r13), %r12d
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	btl	%r15d, %r12d
	jb	LBB0_13
## %bb.12:
	leaq	-80(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	%r15d, -80(%rbp)
	movl	%ebx, -76(%rbp)
	movq	_WMI_IMPLICIT_PSTREAM_INACTIVITY_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movl	%eax, -68(%rbp)
	movq	_WMI_IMPLICIT_PSTREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movq	%r13, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movq	%r14, %rdx
	callq	_ath6kl_wmi_create_pstream_cmd
LBB0_13:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, (%rax)
	xorl	%eax, %eax
LBB0_14:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IP_ETHERTYPE,4,2               ## @IP_ETHERTYPE
	.comm	_WMM_AC_BE,4,2                  ## @WMM_AC_BE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_WMI_DATA_HDR_META_SHIFT,4,2    ## @WMI_DATA_HDR_META_SHIFT
	.comm	_WMI_DATA_HDR_META_MASK,4,2     ## @WMI_DATA_HDR_META_MASK
	.comm	_WMI_MAX_TX_META_SZ,4,2         ## @WMI_MAX_TX_META_SZ
	.comm	_ETH_P_PAE,4,2                  ## @ETH_P_PAE
	.comm	_WMI_VOICE_USER_PRIORITY,4,2    ## @WMI_VOICE_USER_PRIORITY
	.comm	_WMM_AC_VI,8,3                  ## @WMM_AC_VI
	.comm	_up_to_ac,8,3                   ## @up_to_ac
	.comm	_WMI_IMPLICIT_PSTREAM_INACTIVITY_INT,4,2 ## @WMI_IMPLICIT_PSTREAM_INACTIVITY_INT
	.comm	_WMI_IMPLICIT_PSTREAM,4,2       ## @WMI_IMPLICIT_PSTREAM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_wmi_implicit_create_pstream ; -- Begin function ath6kl_wmi_implicit_create_pstream
	.p2align	2
_ath6kl_wmi_implicit_create_pstream:    ; @ath6kl_wmi_implicit_create_pstream
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x5
	mov	x26, x4
	mov	x24, x3
	mov	x23, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _IP_ETHERTYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IP_ETHERTYPE@GOTPAGEOFF]
Lloh2:
	ldr	w25, [x8]
	cmp	x2, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_2:
	ldr	x22, [x23]
	ldr	w0, [x22]
	bl	_le16_to_cpu
	cbz	w26, LBB0_5
; %bb.3:
Lloh6:
	adrp	x8, _WMI_DATA_HDR_META_SHIFT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WMI_DATA_HDR_META_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	asr	w8, w0, w8
Lloh9:
	adrp	x9, _WMI_DATA_HDR_META_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _WMI_DATA_HDR_META_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _WMI_MAX_TX_META_SZ@GOTPAGE
Lloh13:
	ldr	x10, [x10, _WMI_MAX_TX_META_SZ@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	tst	w8, w9
	csel	w8, wzr, w10, eq
	add	x26, x22, w8, sxtw #2
	ldr	x27, [x26, #32]!
	mov	x0, x25
	bl	_htons
	cmp	x27, x0
	b.ne	LBB0_6
; %bb.4:
	add	x0, x26, #32
	mov	x1, x24
	bl	_ath6kl_wmi_determine_user_priority
	mov	x24, x0
	b	LBB0_7
LBB0_5:
	mov	w8, #0
	b	LBB0_8
LBB0_6:
	and	w24, w24, #0x7
LBB0_7:
	ldr	x23, [x23, #8]
Lloh15:
	adrp	x8, _ETH_P_PAE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ETH_P_PAE@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_cpu_to_be16
Lloh18:
	adrp	x8, _WMI_VOICE_USER_PRIORITY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _WMI_VOICE_USER_PRIORITY@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	x23, x0
	csel	w8, w8, w24, eq
LBB0_8:
Lloh21:
	adrp	x9, _WMM_AC_VI@GOTPAGE
Lloh22:
	ldr	x9, [x9, _WMM_AC_VI@GOTPAGEOFF]
	ldr	x10, [x21]
Lloh23:
	ldr	x9, [x9]
	and	w11, w8, #0xfffffffe
	cmp	w11, #4
	ccmp	x10, x9, #0, eq
	csinc	w23, w8, wzr, ne
Lloh24:
	adrp	x8, _up_to_ac@GOTPAGE
Lloh25:
	ldr	x8, [x8, _up_to_ac@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	and	w9, w23, #0x7
	ldr	w24, [x8, w9, uxtw #2]
	mov	x0, x22
	mov	x1, x23
	bl	_wmi_data_hdr_set_up
	add	x22, x21, #12
	mov	x0, x22
	bl	_spin_lock_bh
	ldr	w25, [x21, #8]
	mov	x0, x22
	bl	_spin_unlock_bh
	lsr	w8, w25, w24
	tbnz	w8, #0, LBB0_10
; %bb.9:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	stp	w24, w23, [sp]
Lloh27:
	adrp	x8, _WMI_IMPLICIT_PSTREAM_INACTIVITY_INT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _WMI_IMPLICIT_PSTREAM_INACTIVITY_INT@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	bl	_cpu_to_le32
Lloh30:
	adrp	x8, _WMI_IMPLICIT_PSTREAM@GOTPAGE
Lloh31:
	ldr	x8, [x8, _WMI_IMPLICIT_PSTREAM@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	stp	w8, w0, [sp, #8]
	mov	x2, sp
	mov	x0, x21
	mov	x1, x20
	bl	_ath6kl_wmi_create_pstream_cmd
LBB0_10:
	mov	w0, #0
	str	w24, [x19]
LBB0_11:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_IP_ETHERTYPE,4,2               ; @IP_ETHERTYPE
	.comm	_WMM_AC_BE,4,2                  ; @WMM_AC_BE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_WMI_DATA_HDR_META_SHIFT,4,2    ; @WMI_DATA_HDR_META_SHIFT
	.comm	_WMI_DATA_HDR_META_MASK,4,2     ; @WMI_DATA_HDR_META_MASK
	.comm	_WMI_MAX_TX_META_SZ,4,2         ; @WMI_MAX_TX_META_SZ
	.comm	_ETH_P_PAE,4,2                  ; @ETH_P_PAE
	.comm	_WMI_VOICE_USER_PRIORITY,4,2    ; @WMI_VOICE_USER_PRIORITY
	.comm	_WMM_AC_VI,8,3                  ; @WMM_AC_VI
	.comm	_up_to_ac,8,3                   ; @up_to_ac
	.comm	_WMI_IMPLICIT_PSTREAM_INACTIVITY_INT,4,2 ; @WMI_IMPLICIT_PSTREAM_INACTIVITY_INT
	.comm	_WMI_IMPLICIT_PSTREAM,4,2       ; @WMI_IMPLICIT_PSTREAM
.subsections_via_symbols
