	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_wmi_cmd_send            ## -- Begin function ath6kl_wmi_cmd_send
	.p2align	4, 0x90
_ath6kl_wmi_cmd_send:                   ## @ath6kl_wmi_cmd_send
	.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
	movl	%r8d, -68(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r12d
	movq	%rdx, %r15
	movl	%esi, %ebx
	movq	%rdi, %r14
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	8(%r14), %rax
	xorl	%edi, %edi
	cmpl	%ebx, (%rax)
	setle	%dil
	jmp	LBB0_3
LBB0_1:
	movl	$1, %edi
LBB0_3:
	movl	(%r14), %r13d
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_dev_kfree_skb
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_17
LBB0_5:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	_ATH6KL_DBG_WMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r15), %ecx
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %ebx
	movl	%r12d, %edx
	movl	-68(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %r8d
	callq	_ath6kl_dbg
	movq	_ATH6KL_DBG_WMI_DUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	leaq	L_.str.1(%rip), %rdx
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_ath6kl_dbg_dump
	movq	_END_WMIFLAG@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jbe	LBB0_6
## %bb.7:
	movq	_SYNC_BEFORE_WMIFLAG@GOTPCREL(%rip), %rax
	movq	_SYNC_BOTH_WMIFLAG@GOTPCREL(%rip), %r12
	cmpl	%r13d, (%rax)
	je	LBB0_9
## %bb.8:
	cmpl	%r13d, (%r12)
	jne	LBB0_10
LBB0_9:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_ath6kl_wmi_sync_point
LBB0_10:
	movq	%r15, %rdi
	movl	$16, %esi
	callq	_skb_push
	movq	(%r15), %r14
	movl	%ebx, %edi
	callq	_cpu_to_le16
	movq	%rax, 8(%r14)
	movq	_WMI_CMD_HDR_IF_ID_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	-64(%rbp), %edi                 ## 4-byte Folded Reload
	callq	_cpu_to_le16
	movq	%rax, (%r14)
	movq	_WMI_OPT_TX_FRAME_CMDID@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_14
## %bb.11:
	movq	_OPT_MSGTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	pushq	$0
	callq	_ath6kl_wmi_data_hdr_add
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_dev_kfree_skb
	jmp	LBB0_17
LBB0_6:
	movq	%r15, %rdi
	callq	_dev_kfree_skb
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_17
LBB0_13:
	movq	8(%rbx), %rdi
	movq	_WMM_AC_BE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ath6kl_ac2_endpoint_id
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_14:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	movq	%r15, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_ath6kl_control_tx
	movq	_SYNC_AFTER_WMIFLAG@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	cmpl	%r13d, (%rax)
	je	LBB0_16
## %bb.15:
	cmpl	%r13d, (%r12)
	jne	LBB0_17
LBB0_16:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_ath6kl_wmi_sync_point
LBB0_17:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ATH6KL_DBG_WMI,4,2             ## @ATH6KL_DBG_WMI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wmi tx id %d len %d flag %d\n"

	.comm	_ATH6KL_DBG_WMI_DUMP,4,2        ## @ATH6KL_DBG_WMI_DUMP
L_.str.1:                               ## @.str.1
	.asciz	"wmi tx "

	.comm	_END_WMIFLAG,4,2                ## @END_WMIFLAG
	.comm	_SYNC_BEFORE_WMIFLAG,4,2        ## @SYNC_BEFORE_WMIFLAG
	.comm	_SYNC_BOTH_WMIFLAG,4,2          ## @SYNC_BOTH_WMIFLAG
	.comm	_WMI_CMD_HDR_IF_ID_MASK,4,2     ## @WMI_CMD_HDR_IF_ID_MASK
	.comm	_WMI_OPT_TX_FRAME_CMDID,4,2     ## @WMI_OPT_TX_FRAME_CMDID
	.comm	_OPT_MSGTYPE,4,2                ## @OPT_MSGTYPE
	.comm	_WMM_AC_BE,4,2                  ## @WMM_AC_BE
	.comm	_SYNC_AFTER_WMIFLAG,4,2         ## @SYNC_AFTER_WMIFLAG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_wmi_cmd_send            ; -- Begin function ath6kl_wmi_cmd_send
	.p2align	2
_ath6kl_wmi_cmd_send:                   ; @ath6kl_wmi_cmd_send
	.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	x21, x4
	mov	x23, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	cbz	x2, LBB0_2
; %bb.1:
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	cmp	w8, w19
	cset	w0, le
	b	LBB0_3
LBB0_2:
	mov	w0, #1
LBB0_3:
	ldr	w24, [x20]
	bl	_WARN_ON
	cbnz	x0, LBB0_10
; %bb.4:
Lloh0:
	adrp	x8, _ATH6KL_DBG_WMI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATH6KL_DBG_WMI@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w3, [x22, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	mov	x4, x21
	bl	_ath6kl_dbg
Lloh5:
	adrp	x8, _ATH6KL_DBG_WMI_DUMP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ATH6KL_DBG_WMI_DUMP@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	x3, [x22]
	ldr	w4, [x22, #8]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x1, #0
	bl	_ath6kl_dbg_dump
Lloh10:
	adrp	x8, _END_WMIFLAG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _END_WMIFLAG@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ls	LBB0_10
; %bb.5:
Lloh13:
	adrp	x8, _SYNC_BEFORE_WMIFLAG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SYNC_BEFORE_WMIFLAG@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x25, _SYNC_BOTH_WMIFLAG@GOTPAGE
Lloh17:
	ldr	x25, [x25, _SYNC_BOTH_WMIFLAG@GOTPAGEOFF]
	ldr	w9, [x25]
	cmp	w8, w21
	ccmp	w9, w21, #4, ne
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x20
	mov	x1, x19
	bl	_ath6kl_wmi_sync_point
LBB0_7:
	mov	x0, x22
	mov	w1, #16
	bl	_skb_push
	ldr	x26, [x22]
	mov	x0, x23
	bl	_cpu_to_le16
	str	x0, [x26, #8]
Lloh18:
	adrp	x8, _WMI_CMD_HDR_IF_ID_MASK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _WMI_CMD_HDR_IF_ID_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	and	w0, w8, w19
	bl	_cpu_to_le16
	str	x0, [x26]
Lloh21:
	adrp	x8, _WMI_OPT_TX_FRAME_CMDID@GOTPAGE
Lloh22:
	ldr	x8, [x8, _WMI_OPT_TX_FRAME_CMDID@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cmp	w8, w23
	b.ne	LBB0_13
; %bb.8:
Lloh24:
	adrp	x8, _OPT_MSGTYPE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _OPT_MSGTYPE@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x22
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	mov	x6, #0
	mov	x7, x19
	bl	_ath6kl_wmi_data_hdr_add
	cbz	w0, LBB0_12
; %bb.9:
	mov	x23, x0
	mov	x0, x22
	bl	_dev_kfree_skb
	b	LBB0_11
LBB0_10:
	mov	x0, x22
	bl	_dev_kfree_skb
Lloh27:
	adrp	x8, _EINVAL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_11:
	mov	x0, x23
	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_12:
	ldr	x0, [x20, #8]
Lloh30:
	adrp	x8, _WMM_AC_BE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _WMM_AC_BE@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	bl	_ath6kl_ac2_endpoint_id
	mov	x24, x0
LBB0_13:
	ldr	x0, [x20, #8]
	mov	x1, x22
	mov	x2, x24
	bl	_ath6kl_control_tx
Lloh33:
	adrp	x8, _SYNC_AFTER_WMIFLAG@GOTPAGE
Lloh34:
	ldr	x8, [x8, _SYNC_AFTER_WMIFLAG@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_15
; %bb.14:
	ldr	w8, [x25]
	cmp	w8, w21
	b.ne	LBB0_16
LBB0_15:
	mov	x0, x20
	mov	x1, x19
	bl	_ath6kl_wmi_sync_point
LBB0_16:
	mov	w23, #0
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ATH6KL_DBG_WMI,4,2             ; @ATH6KL_DBG_WMI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wmi tx id %d len %d flag %d\n"

	.comm	_ATH6KL_DBG_WMI_DUMP,4,2        ; @ATH6KL_DBG_WMI_DUMP
l_.str.1:                               ; @.str.1
	.asciz	"wmi tx "

	.comm	_END_WMIFLAG,4,2                ; @END_WMIFLAG
	.comm	_SYNC_BEFORE_WMIFLAG,4,2        ; @SYNC_BEFORE_WMIFLAG
	.comm	_SYNC_BOTH_WMIFLAG,4,2          ; @SYNC_BOTH_WMIFLAG
	.comm	_WMI_CMD_HDR_IF_ID_MASK,4,2     ; @WMI_CMD_HDR_IF_ID_MASK
	.comm	_WMI_OPT_TX_FRAME_CMDID,4,2     ; @WMI_OPT_TX_FRAME_CMDID
	.comm	_OPT_MSGTYPE,4,2                ; @OPT_MSGTYPE
	.comm	_WMM_AC_BE,4,2                  ; @WMM_AC_BE
	.comm	_SYNC_AFTER_WMIFLAG,4,2         ; @SYNC_AFTER_WMIFLAG
.subsections_via_symbols
