	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __mt7615_mcu_msg_send
___mt7615_mcu_msg_send:                 ## @__mt7615_mcu_msg_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
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %ebx
	movq	%rsi, %r15
	movl	4(%rdi), %eax
	leal	1(%rax), %ecx
	movl	%ecx, 4(%rdi)
	andl	$15, %ecx
	jne	LBB0_2
## %bb.1:
	addl	$2, %eax
	movl	%eax, 4(%rdi)
	andl	$15, %eax
	movl	%eax, %ecx
LBB0_2:
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movl	$56, %esi
	callq	_skb_push
	movq	%rax, %r12
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$56, %edx
	callq	_memset
	movq	_MCU_CMD_FW_SCATTER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	movq	_MT_TX_MCU_PORT_RX_Q0@GOTPCREL(%rip), %rax
	cmoveq	_MT_TX_MCU_PORT_RX_FWDL@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	_MT_TX_TYPE_CMD@GOTPCREL(%rip), %rax
	cmoveq	_MT_TX_TYPE_FW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	48(%r12), %rbx
	movq	_MT_TXD0_TX_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	callq	_FIELD_PREP
	movl	%eax, %r14d
	movq	_MT_TXD0_P_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MT_TX_PORT_IDX_MCU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_FIELD_PREP
	orl	%eax, %r14d
	movq	_MT_TXD0_Q_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r13d, %esi
	callq	_FIELD_PREP
	orl	%eax, %r14d
	movl	%r14d, %edi
	callq	_cpu_to_le32
	movq	%rbx, %r13
	movl	%eax, (%rbx)
	movq	_MT_TXD1_LONG_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_MT_TXD1_HDR_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MT_HDR_FORMAT_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_FIELD_PREP
	orl	%eax, %ebx
	movq	_MT_TXD1_PKT_FMT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_FIELD_PREP
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_le32
	movl	%eax, 4(%r13)
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	movl	(%r15), %edi
	addl	$-8, %edi
	callq	_cpu_to_le16
	movq	%rax, 40(%r12)
	movq	_MT_TX_PORT_IDX_MCU@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_MCU_PQ_ID
	movl	%eax, %edi
	callq	_cpu_to_le16
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	movq	%rax, 32(%r12)
	movq	_MCU_PKT_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r12)
	movl	%edx, (%r12)
	testl	%ebx, %ebx
	js	LBB0_3
## %bb.4:
	movq	_MCU_CMD_EXT_CID@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_MCU_Q_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%ebx, 8(%r12)
	movl	$1, 12(%r12)
	movl	%ecx, %ebx
	jmp	LBB0_5
LBB0_3:
	movq	_MCU_Q_NA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	negl	%ebx
LBB0_5:
	movl	%eax, 20(%r12)
	movl	%ebx, 4(%r12)
	movq	_MCU_S2D_H2N@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_7
## %bb.6:
	movl	%edx, (%rax)
LBB0_7:
	movq	_MT76_STATE_MCU_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_8
## %bb.9:
	movq	_MT_TXQ_FWDL@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_MT_TXQ_MCU@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt76_tx_queue_skb_raw          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MCU_CMD_FW_SCATTER,4,2         ## @MCU_CMD_FW_SCATTER
	.comm	_MT_TX_MCU_PORT_RX_Q0,4,2       ## @MT_TX_MCU_PORT_RX_Q0
	.comm	_MT_TX_TYPE_CMD,4,2             ## @MT_TX_TYPE_CMD
	.comm	_MT_TX_MCU_PORT_RX_FWDL,4,2     ## @MT_TX_MCU_PORT_RX_FWDL
	.comm	_MT_TX_TYPE_FW,4,2              ## @MT_TX_TYPE_FW
	.comm	_MT_TXD0_TX_BYTES,4,2           ## @MT_TXD0_TX_BYTES
	.comm	_MT_TXD0_P_IDX,4,2              ## @MT_TXD0_P_IDX
	.comm	_MT_TX_PORT_IDX_MCU,4,2         ## @MT_TX_PORT_IDX_MCU
	.comm	_MT_TXD0_Q_IDX,4,2              ## @MT_TXD0_Q_IDX
	.comm	_MT_TXD1_LONG_FORMAT,4,2        ## @MT_TXD1_LONG_FORMAT
	.comm	_MT_TXD1_HDR_FORMAT,4,2         ## @MT_TXD1_HDR_FORMAT
	.comm	_MT_HDR_FORMAT_CMD,4,2          ## @MT_HDR_FORMAT_CMD
	.comm	_MT_TXD1_PKT_FMT,4,2            ## @MT_TXD1_PKT_FMT
	.comm	_MCU_PKT_ID,4,2                 ## @MCU_PKT_ID
	.comm	_MCU_Q_NA,4,2                   ## @MCU_Q_NA
	.comm	_MCU_CMD_EXT_CID,4,2            ## @MCU_CMD_EXT_CID
	.comm	_MCU_Q_SET,4,2                  ## @MCU_Q_SET
	.comm	_MCU_S2D_H2N,4,2                ## @MCU_S2D_H2N
	.comm	_MT76_STATE_MCU_RUNNING,4,2     ## @MT76_STATE_MCU_RUNNING
	.comm	_MT_TXQ_MCU,4,2                 ## @MT_TXQ_MCU
	.comm	_MT_TXQ_FWDL,4,2                ## @MT_TXQ_FWDL
	.no_dead_strip	___mt7615_mcu_msg_send
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __mt7615_mcu_msg_send
___mt7615_mcu_msg_send:                 ; @__mt7615_mcu_msg_send
	.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	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x0, #4]
	add	w9, w8, #1
	str	w9, [x0, #4]
	ands	w27, w9, #0xf
	str	x3, [sp, #8]                    ; 8-byte Folded Spill
	b.ne	LBB0_2
; %bb.1:
	add	w8, w8, #2
	str	w8, [x20, #4]
	and	w27, w8, #0xf
LBB0_2:
	mov	x0, x19
	mov	w1, #56
	bl	_skb_push
	mov	x23, x0
	mov	w1, #0
	mov	w2, #56
	bl	_memset
Lloh0:
	adrp	x8, _MCU_CMD_FW_SCATTER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MCU_CMD_FW_SCATTER@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _MT_TX_MCU_PORT_RX_FWDL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MT_TX_MCU_PORT_RX_FWDL@GOTPAGEOFF]
Lloh5:
	adrp	x10, _MT_TX_MCU_PORT_RX_Q0@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MT_TX_MCU_PORT_RX_Q0@GOTPAGEOFF]
	cmn	w8, w22
	csel	x8, x9, x10, eq
	ldr	w24, [x8]
Lloh7:
	adrp	x8, _MT_TX_TYPE_FW@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MT_TX_TYPE_FW@GOTPAGEOFF]
Lloh9:
	adrp	x9, _MT_TX_TYPE_CMD@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MT_TX_TYPE_CMD@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w25, [x8]
	ldr	x28, [x23, #48]
Lloh11:
	adrp	x8, _MT_TXD0_TX_BYTES@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MT_TXD0_TX_BYTES@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_FIELD_PREP
	mov	x26, x0
Lloh14:
	adrp	x8, _MT_TXD0_P_IDX@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MT_TXD0_P_IDX@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x21, _MT_TX_PORT_IDX_MCU@GOTPAGE
Lloh18:
	ldr	x21, [x21, _MT_TX_PORT_IDX_MCU@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_FIELD_PREP
	orr	w26, w0, w26
Lloh19:
	adrp	x8, _MT_TXD0_Q_IDX@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MT_TXD0_Q_IDX@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	mov	x1, x24
	bl	_FIELD_PREP
	orr	w0, w26, w0
	bl	_cpu_to_le32
	str	w0, [x28]
Lloh22:
	adrp	x8, _MT_TXD1_LONG_FORMAT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MT_TXD1_LONG_FORMAT@GOTPAGEOFF]
Lloh24:
	ldr	w26, [x8]
Lloh25:
	adrp	x8, _MT_TXD1_HDR_FORMAT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MT_TXD1_HDR_FORMAT@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	adrp	x8, _MT_HDR_FORMAT_CMD@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MT_HDR_FORMAT_CMD@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	bl	_FIELD_PREP
	orr	w26, w0, w26
Lloh31:
	adrp	x8, _MT_TXD1_PKT_FMT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MT_TXD1_PKT_FMT@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	mov	x1, x25
	bl	_FIELD_PREP
	orr	w0, w26, w0
	bl	_cpu_to_le32
	str	w0, [x28, #4]
	ldr	w8, [x19]
	sub	w0, w8, #8
	bl	_cpu_to_le16
	str	x0, [x23, #40]
	ldr	w0, [x21]
	mov	x1, x24
	bl	_MCU_PQ_ID
	bl	_cpu_to_le16
	str	x0, [x23, #32]
Lloh34:
	adrp	x8, _MCU_PKT_ID@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MCU_PKT_ID@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	str	w8, [x23, #24]
	str	w27, [x23]
	tbnz	w22, #31, LBB0_4
; %bb.3:
Lloh37:
	adrp	x8, _MCU_CMD_EXT_CID@GOTPAGE
Lloh38:
	ldr	x8, [x8, _MCU_CMD_EXT_CID@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x8]
Lloh40:
	adrp	x8, _MCU_Q_SET@GOTPAGE
Lloh41:
	ldr	x8, [x8, _MCU_Q_SET@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	mov	w10, #1
	stp	w22, w10, [x23, #8]
	b	LBB0_5
LBB0_4:
Lloh43:
	adrp	x8, _MCU_Q_NA@GOTPAGE
Lloh44:
	ldr	x8, [x8, _MCU_Q_NA@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	neg	w9, w22
LBB0_5:
	ldr	x10, [sp, #8]                   ; 8-byte Folded Reload
	str	w9, [x23, #4]
Lloh46:
	adrp	x9, _MCU_S2D_H2N@GOTPAGE
Lloh47:
	ldr	x9, [x9, _MCU_S2D_H2N@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
	stp	w9, w8, [x23, #16]
	cbz	x10, LBB0_7
; %bb.6:
	str	w27, [x10]
LBB0_7:
Lloh49:
	adrp	x8, _MT76_STATE_MCU_RUNNING@GOTPAGE
Lloh50:
	ldr	x8, [x8, _MT76_STATE_MCU_RUNNING@GOTPAGEOFF]
Lloh51:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_bit
Lloh52:
	adrp	x8, _MT_TXQ_FWDL@GOTPAGE
Lloh53:
	ldr	x8, [x8, _MT_TXQ_FWDL@GOTPAGEOFF]
Lloh54:
	adrp	x9, _MT_TXQ_MCU@GOTPAGE
Lloh55:
	ldr	x9, [x9, _MT_TXQ_MCU@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x19
	mov	w3, #0
	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
	b	_mt76_tx_queue_skb_raw
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_MCU_CMD_FW_SCATTER,4,2         ; @MCU_CMD_FW_SCATTER
	.comm	_MT_TX_MCU_PORT_RX_Q0,4,2       ; @MT_TX_MCU_PORT_RX_Q0
	.comm	_MT_TX_TYPE_CMD,4,2             ; @MT_TX_TYPE_CMD
	.comm	_MT_TX_MCU_PORT_RX_FWDL,4,2     ; @MT_TX_MCU_PORT_RX_FWDL
	.comm	_MT_TX_TYPE_FW,4,2              ; @MT_TX_TYPE_FW
	.comm	_MT_TXD0_TX_BYTES,4,2           ; @MT_TXD0_TX_BYTES
	.comm	_MT_TXD0_P_IDX,4,2              ; @MT_TXD0_P_IDX
	.comm	_MT_TX_PORT_IDX_MCU,4,2         ; @MT_TX_PORT_IDX_MCU
	.comm	_MT_TXD0_Q_IDX,4,2              ; @MT_TXD0_Q_IDX
	.comm	_MT_TXD1_LONG_FORMAT,4,2        ; @MT_TXD1_LONG_FORMAT
	.comm	_MT_TXD1_HDR_FORMAT,4,2         ; @MT_TXD1_HDR_FORMAT
	.comm	_MT_HDR_FORMAT_CMD,4,2          ; @MT_HDR_FORMAT_CMD
	.comm	_MT_TXD1_PKT_FMT,4,2            ; @MT_TXD1_PKT_FMT
	.comm	_MCU_PKT_ID,4,2                 ; @MCU_PKT_ID
	.comm	_MCU_Q_NA,4,2                   ; @MCU_Q_NA
	.comm	_MCU_CMD_EXT_CID,4,2            ; @MCU_CMD_EXT_CID
	.comm	_MCU_Q_SET,4,2                  ; @MCU_Q_SET
	.comm	_MCU_S2D_H2N,4,2                ; @MCU_S2D_H2N
	.comm	_MT76_STATE_MCU_RUNNING,4,2     ; @MT76_STATE_MCU_RUNNING
	.comm	_MT_TXQ_MCU,4,2                 ; @MT_TXQ_MCU
	.comm	_MT_TXQ_FWDL,4,2                ; @MT_TXQ_FWDL
	.no_dead_strip	___mt7615_mcu_msg_send
.subsections_via_symbols
