	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __mt76x02u_mcu_send_msg
___mt76x02u_mcu_send_msg:               ## @__mt76x02u_mcu_send_msg
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movl	%edx, %r13d
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_MT76_REMOVED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_bit
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_10
## %bb.1:
	testl	%ebx, %ebx
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.3:
	movl	4(%r14), %eax
	leal	1(%rax), %r12d
	movl	%r12d, 4(%r14)
	andl	$15, %r12d
	jne	LBB0_5
## %bb.4:
	addl	$2, %eax
	movl	%eax, 4(%r14)
	andl	$15, %eax
	movl	%eax, %r12d
	jmp	LBB0_5
LBB0_2:
	xorl	%r12d, %r12d
LBB0_5:
	movq	_MT_MCU_MSG_CMD_SEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r12d, %esi
	callq	_FIELD_PREP
	movl	%eax, %r15d
	movq	_MT_MCU_MSG_CMD_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r13d, %esi
	callq	_FIELD_PREP
	orl	%eax, %r15d
	movq	_MT_MCU_MSG_TYPE_CMD@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	_CPU_TX_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %edx
	movq	%rdi, %r15
	callq	_mt76x02u_skb_dma_info
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	movl	(%r15), %edx
	movl	4(%r15), %esi
	xorl	%r13d, %r13d
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	movl	$500, %r8d                      ## imm = 0x1F4
	callq	_mt76u_bulk_msg
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_mt76x02u_mcu_wait_resp
	movl	%eax, %r13d
LBB0_9:
	movq	%r15, %rdi
	callq	_consume_skb
	movl	%r13d, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT76_REMOVED,4,2               ## @MT76_REMOVED
	.comm	_MT_MCU_MSG_CMD_SEQ,4,2         ## @MT_MCU_MSG_CMD_SEQ
	.comm	_MT_MCU_MSG_CMD_TYPE,4,2        ## @MT_MCU_MSG_CMD_TYPE
	.comm	_MT_MCU_MSG_TYPE_CMD,4,2        ## @MT_MCU_MSG_TYPE_CMD
	.comm	_CPU_TX_PORT,4,2                ## @CPU_TX_PORT
	.no_dead_strip	___mt76x02u_mcu_send_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __mt76x02u_mcu_send_msg
___mt76x02u_mcu_send_msg:               ; @__mt76x02u_mcu_send_msg
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x3
	mov	x23, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _MT76_REMOVED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT76_REMOVED@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_2
; %bb.1:
	mov	w23, #0
	b	LBB0_12
LBB0_2:
	cbz	w21, LBB0_5
; %bb.3:
	ldr	w8, [x20, #4]
	add	w9, w8, #1
	str	w9, [x20, #4]
	ands	w22, w9, #0xf
	b.ne	LBB0_6
; %bb.4:
	add	w8, w8, #2
	str	w8, [x20, #4]
	and	w22, w8, #0xf
	b	LBB0_6
LBB0_5:
	mov	w22, #0
LBB0_6:
Lloh3:
	adrp	x8, _MT_MCU_MSG_CMD_SEQ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MT_MCU_MSG_CMD_SEQ@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_FIELD_PREP
	mov	x24, x0
Lloh6:
	adrp	x8, _MT_MCU_MSG_CMD_TYPE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MT_MCU_MSG_CMD_TYPE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x23
	bl	_FIELD_PREP
Lloh9:
	adrp	x8, _MT_MCU_MSG_TYPE_CMD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MT_MCU_MSG_TYPE_CMD@GOTPAGEOFF]
	orr	w9, w0, w24
Lloh11:
	ldr	w8, [x8]
	orr	w2, w9, w8
Lloh12:
	adrp	x8, _CPU_TX_PORT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CPU_TX_PORT@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mt76x02u_skb_dma_info
	mov	x23, x0
	cbnz	w0, LBB0_12
; %bb.7:
	ldp	w2, w1, [x19]
	mov	x0, x20
	mov	x3, #0
	mov	w4, #500
	bl	_mt76u_bulk_msg
	mov	x23, x0
	cbnz	w0, LBB0_12
; %bb.8:
	cbz	w21, LBB0_10
; %bb.9:
	mov	x0, x20
	mov	x1, x22
	bl	_mt76x02u_mcu_wait_resp
	mov	x23, x0
	b	LBB0_11
LBB0_10:
	mov	w23, #0
LBB0_11:
	mov	x0, x19
	bl	_consume_skb
LBB0_12:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MT76_REMOVED,4,2               ; @MT76_REMOVED
	.comm	_MT_MCU_MSG_CMD_SEQ,4,2         ; @MT_MCU_MSG_CMD_SEQ
	.comm	_MT_MCU_MSG_CMD_TYPE,4,2        ; @MT_MCU_MSG_CMD_TYPE
	.comm	_MT_MCU_MSG_TYPE_CMD,4,2        ; @MT_MCU_MSG_TYPE_CMD
	.comm	_CPU_TX_PORT,4,2                ; @CPU_TX_PORT
	.no_dead_strip	___mt76x02u_mcu_send_msg
.subsections_via_symbols
