	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2500pci_write_beacon
_rt2500pci_write_beacon:                ## @rt2500pci_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	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	movq	_CSR14@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_rt2x00mmio_register_read
	movl	%eax, -44(%rbp)
	movq	_CSR14_BEACON_GEN@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdi
	xorl	%edx, %edx
	callq	_rt2x00_set_field32
	movl	(%r12), %esi
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2x00mmio_register_write
	movq	%r14, %rdi
	callq	_rt2x00queue_map_txskb
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_rt2x00_err
	jmp	LBB0_3
LBB0_2:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_rt2500pci_write_tx_desc
	movq	_DUMP_FRAME_BEACON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_rt2x00debug_dump_frame
LBB0_3:
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field32
	movl	(%r12), %esi
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2x00mmio_register_write
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CSR14,4,2                      ## @CSR14
	.comm	_CSR14_BEACON_GEN,4,2           ## @CSR14_BEACON_GEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Fail to map beacon, aborting\n"

	.comm	_DUMP_FRAME_BEACON,4,2          ## @DUMP_FRAME_BEACON
	.no_dead_strip	_rt2500pci_write_beacon
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2500pci_write_beacon
_rt2500pci_write_beacon:                ; @rt2500pci_write_beacon
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x19, [x8]
Lloh0:
	adrp	x22, _CSR14@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CSR14@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rt2x00mmio_register_read
	str	w0, [sp, #12]
Lloh2:
	adrp	x23, _CSR14_BEACON_GEN@GOTPAGE
Lloh3:
	ldr	x23, [x23, _CSR14_BEACON_GEN@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x0, sp, #12
	mov	w2, #0
	bl	_rt2x00_set_field32
	ldr	w1, [x22]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2x00mmio_register_write
	mov	x0, x20
	bl	_rt2x00queue_map_txskb
	cbz	x0, LBB0_2
; %bb.1:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_rt2x00_err
	b	LBB0_3
LBB0_2:
	mov	x0, x20
	mov	x1, x21
	bl	_rt2500pci_write_tx_desc
Lloh6:
	adrp	x8, _DUMP_FRAME_BEACON@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DUMP_FRAME_BEACON@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_rt2x00debug_dump_frame
LBB0_3:
	ldr	w1, [x23]
	add	x0, sp, #12
	mov	w2, #1
	bl	_rt2x00_set_field32
	ldr	w1, [x22]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2x00mmio_register_write
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CSR14,4,2                      ; @CSR14
	.comm	_CSR14_BEACON_GEN,4,2           ; @CSR14_BEACON_GEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Fail to map beacon, aborting\n"

	.comm	_DUMP_FRAME_BEACON,4,2          ; @DUMP_FRAME_BEACON
	.no_dead_strip	_rt2500pci_write_beacon
.subsections_via_symbols
