	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2800mmio_tbtt_tasklet        ## -- Begin function rt2800mmio_tbtt_tasklet
	.p2align	4, 0x90
_rt2800mmio_tbtt_tasklet:               ## @rt2800mmio_tbtt_tasklet
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	callq	_rt2x00lib_beacondone
	cmpq	$0, 8(%rbx)
	je	LBB0_7
## %bb.1:
	movl	(%r14), %eax
	movq	_BCN_TBTT_OFFSET@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	leal	-2(%rcx), %edx
	cmpl	%edx, %eax
	jne	LBB0_3
## %bb.2:
	movq	_BCN_TIME_CFG@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_rt2x00mmio_register_read
	movl	%eax, -36(%rbp)
	movq	_BCN_TIME_CFG_BEACON_INTERVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	shll	$4, %edx
	decl	%edx
	jmp	LBB0_5
LBB0_3:
	decl	%ecx
	cmpl	%ecx, %eax
	jne	LBB0_6
## %bb.4:
	movq	_BCN_TIME_CFG@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_rt2x00mmio_register_read
	movl	%eax, -36(%rbp)
	movq	_BCN_TIME_CFG_BEACON_INTERVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	shll	$4, %edx
LBB0_5:
	leaq	-36(%rbp), %rdi
	callq	_rt2x00_set_field32
	movl	(%r12), %esi
	movl	-36(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2x00mmio_register_write
LBB0_6:
	movl	(%r14), %eax
	incl	%eax
	movl	%eax, (%r14)
	cltd
	idivl	(%r15)
	movl	%edx, (%r14)
LBB0_7:
	movq	_DEVICE_STATE_ENABLED_RADIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%rbx), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_INT_MASK_CSR_TBTT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2800mmio_enable_interrupt
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BCN_TBTT_OFFSET,4,2            ## @BCN_TBTT_OFFSET
	.comm	_BCN_TIME_CFG,4,2               ## @BCN_TIME_CFG
	.comm	_BCN_TIME_CFG_BEACON_INTERVAL,4,2 ## @BCN_TIME_CFG_BEACON_INTERVAL
	.comm	_DEVICE_STATE_ENABLED_RADIO,4,2 ## @DEVICE_STATE_ENABLED_RADIO
	.comm	_INT_MASK_CSR_TBTT,4,2          ## @INT_MASK_CSR_TBTT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2800mmio_tbtt_tasklet        ; -- Begin function rt2800mmio_tbtt_tasklet
	.p2align	2
_rt2800mmio_tbtt_tasklet:               ; @rt2800mmio_tbtt_tasklet
	.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	x19, x0
	ldr	x20, [x0, #16]
	bl	_rt2x00lib_beacondone
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
; %bb.1:
	ldr	w8, [x20]
Lloh0:
	adrp	x21, _BCN_TBTT_OFFSET@GOTPAGE
Lloh1:
	ldr	x21, [x21, _BCN_TBTT_OFFSET@GOTPAGEOFF]
	ldr	w9, [x21]
	sub	w10, w9, #2
	cmp	w8, w10
	b.ne	LBB0_3
; %bb.2:
Lloh2:
	adrp	x22, _BCN_TIME_CFG@GOTPAGE
Lloh3:
	ldr	x22, [x22, _BCN_TIME_CFG@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rt2x00mmio_register_read
	str	w0, [sp, #12]
Lloh4:
	adrp	x8, _BCN_TIME_CFG_BEACON_INTERVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _BCN_TIME_CFG_BEACON_INTERVAL@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	ldr	w8, [x19]
	lsl	w8, w8, #4
	sub	w2, w8, #1
	b	LBB0_5
LBB0_3:
	sub	w9, w9, #1
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.4:
Lloh7:
	adrp	x22, _BCN_TIME_CFG@GOTPAGE
Lloh8:
	ldr	x22, [x22, _BCN_TIME_CFG@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rt2x00mmio_register_read
	str	w0, [sp, #12]
Lloh9:
	adrp	x8, _BCN_TIME_CFG_BEACON_INTERVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BCN_TIME_CFG_BEACON_INTERVAL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w8, [x19]
	lsl	w2, w8, #4
LBB0_5:
	add	x0, sp, #12
	bl	_rt2x00_set_field32
	ldr	w1, [x22]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2x00mmio_register_write
LBB0_6:
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	ldr	w9, [x21]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	str	w8, [x20]
LBB0_7:
Lloh12:
	adrp	x8, _DEVICE_STATE_ENABLED_RADIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DEVICE_STATE_ENABLED_RADIO@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_test_bit
	cbz	x0, LBB0_9
; %bb.8:
Lloh15:
	adrp	x8, _INT_MASK_CSR_TBTT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _INT_MASK_CSR_TBTT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2800mmio_enable_interrupt
LBB0_9:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_BCN_TBTT_OFFSET,4,2            ; @BCN_TBTT_OFFSET
	.comm	_BCN_TIME_CFG,4,2               ; @BCN_TIME_CFG
	.comm	_BCN_TIME_CFG_BEACON_INTERVAL,4,2 ; @BCN_TIME_CFG_BEACON_INTERVAL
	.comm	_DEVICE_STATE_ENABLED_RADIO,4,2 ; @DEVICE_STATE_ENABLED_RADIO
	.comm	_INT_MASK_CSR_TBTT,4,2          ; @INT_MASK_CSR_TBTT
.subsections_via_symbols
