	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt76x02_write_beacon
_mt76x02_write_beacon:                  ## @mt76x02_write_beacon
	.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
	movq	%rdx, %r12
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movslq	(%rax), %rax
	movslq	(%rdx), %rcx
	addq	$4, %rcx
	xorl	%edi, %edi
	cmpq	%rax, %rcx
	seta	%dil
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_3
LBB0_2:
	movl	(%r12), %r9d
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r13
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_mt76x02_mac_write_txwi
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	movl	$4, %ecx
	callq	_mt76_wr_copy
	addl	$4, %r14d
	movq	8(%r12), %rdx
	movl	(%r12), %ecx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_mt76_wr_copy
LBB0_3:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.no_dead_strip	_mt76x02_write_beacon
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt76x02_write_beacon
_mt76x02_write_beacon:                  ; @mt76x02_write_beacon
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldrsw	x8, [x8]
	ldrsw	x9, [x2]
	add	x9, x9, #4
	cmp	x9, x8
	cset	w0, hi
	bl	_WARN_ON_ONCE
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	ldr	w5, [x20]
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x20
	mov	x3, #0
	mov	x4, #0
	bl	_mt76x02_mac_write_txwi
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x21
	mov	w3, #4
	bl	_mt76_wr_copy
	add	w1, w21, #4
	ldr	x2, [x20, #8]
	ldr	w3, [x20]
	mov	x0, x19
	bl	_mt76_wr_copy
	mov	w0, #0
LBB0_3:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.no_dead_strip	_mt76x02_write_beacon
.subsections_via_symbols
