	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2800mmio_toggle_irq          ## -- Begin function rt2800mmio_toggle_irq
	.p2align	4, 0x90
_rt2800mmio_toggle_irq:                 ## @rt2800mmio_toggle_irq
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_STATE_RADIO_IRQ_ON@GOTPCREL(%rip), %r12
	cmpl	%esi, (%r12)
	jne	LBB0_2
## %bb.1:
	movq	_INT_SOURCE_CSR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_rt2x00mmio_register_read
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	callq	_rt2x00mmio_register_write
LBB0_2:
	leaq	20(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	$0, -40(%rbp)
	cmpl	%r14d, (%r12)
	jne	LBB0_3
## %bb.4:
	movq	_INT_MASK_CSR_RX_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %r12
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field32
	movq	_INT_MASK_CSR_TBTT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field32
	movq	_INT_MASK_CSR_PRE_TBTT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field32
	movq	_INT_MASK_CSR_TX_FIFO_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field32
	movq	_INT_MASK_CSR_AUTO_WAKEUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_rt2x00_set_field32
	movq	-40(%rbp), %rdx
	jmp	LBB0_5
LBB0_3:
	xorl	%edx, %edx
LBB0_5:
	movq	_INT_MASK_CSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2x00mmio_register_write
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	_STATE_RADIO_IRQ_OFF@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_7
## %bb.6:
	leaq	16(%rbx), %rdi
	callq	_tasklet_kill
	leaq	12(%rbx), %rdi
	callq	_tasklet_kill
	leaq	8(%rbx), %rdi
	callq	_tasklet_kill
	leaq	4(%rbx), %rdi
	callq	_tasklet_kill
	movq	%rbx, %rdi
	callq	_tasklet_kill
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STATE_RADIO_IRQ_ON,4,2         ## @STATE_RADIO_IRQ_ON
	.comm	_INT_SOURCE_CSR,4,2             ## @INT_SOURCE_CSR
	.comm	_INT_MASK_CSR_RX_DONE,4,2       ## @INT_MASK_CSR_RX_DONE
	.comm	_INT_MASK_CSR_TBTT,4,2          ## @INT_MASK_CSR_TBTT
	.comm	_INT_MASK_CSR_PRE_TBTT,4,2      ## @INT_MASK_CSR_PRE_TBTT
	.comm	_INT_MASK_CSR_TX_FIFO_STATUS,4,2 ## @INT_MASK_CSR_TX_FIFO_STATUS
	.comm	_INT_MASK_CSR_AUTO_WAKEUP,4,2   ## @INT_MASK_CSR_AUTO_WAKEUP
	.comm	_INT_MASK_CSR,4,2               ## @INT_MASK_CSR
	.comm	_STATE_RADIO_IRQ_OFF,4,2        ## @STATE_RADIO_IRQ_OFF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2800mmio_toggle_irq          ; -- Begin function rt2800mmio_toggle_irq
	.p2align	2
_rt2800mmio_toggle_irq:                 ; @rt2800mmio_toggle_irq
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _STATE_RADIO_IRQ_ON@GOTPAGE
Lloh1:
	ldr	x22, [x22, _STATE_RADIO_IRQ_ON@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, w1
	b.ne	LBB0_2
; %bb.1:
Lloh2:
	adrp	x21, _INT_SOURCE_CSR@GOTPAGE
Lloh3:
	ldr	x21, [x21, _INT_SOURCE_CSR@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rt2x00mmio_register_read
	mov	x2, x0
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rt2x00mmio_register_write
LBB0_2:
	add	x21, x19, #20
	mov	x0, x21
	bl	_spin_lock_irqsave
	mov	x2, #0
	str	xzr, [sp, #8]
	ldr	w8, [x22]
	cmp	w8, w20
	b.ne	LBB0_4
; %bb.3:
Lloh4:
	adrp	x8, _INT_MASK_CSR_RX_DONE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _INT_MASK_CSR_RX_DONE@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	w2, #1
	bl	_rt2x00_set_field32
Lloh7:
	adrp	x8, _INT_MASK_CSR_TBTT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _INT_MASK_CSR_TBTT@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	w2, #1
	bl	_rt2x00_set_field32
Lloh10:
	adrp	x8, _INT_MASK_CSR_PRE_TBTT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _INT_MASK_CSR_PRE_TBTT@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	w2, #1
	bl	_rt2x00_set_field32
Lloh13:
	adrp	x8, _INT_MASK_CSR_TX_FIFO_STATUS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _INT_MASK_CSR_TX_FIFO_STATUS@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	w2, #1
	bl	_rt2x00_set_field32
Lloh16:
	adrp	x8, _INT_MASK_CSR_AUTO_WAKEUP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _INT_MASK_CSR_AUTO_WAKEUP@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	w2, #1
	bl	_rt2x00_set_field32
	ldr	x2, [sp, #8]
LBB0_4:
Lloh19:
	adrp	x8, _INT_MASK_CSR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _INT_MASK_CSR@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rt2x00mmio_register_write
	mov	x0, x21
	bl	_spin_unlock_irqrestore
Lloh22:
	adrp	x8, _STATE_RADIO_IRQ_OFF@GOTPAGE
Lloh23:
	ldr	x8, [x8, _STATE_RADIO_IRQ_OFF@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_6
; %bb.5:
	add	x0, x19, #16
	bl	_tasklet_kill
	add	x0, x19, #12
	bl	_tasklet_kill
	add	x0, x19, #8
	bl	_tasklet_kill
	add	x0, x19, #4
	bl	_tasklet_kill
	mov	x0, x19
	bl	_tasklet_kill
LBB0_6:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_STATE_RADIO_IRQ_ON,4,2         ; @STATE_RADIO_IRQ_ON
	.comm	_INT_SOURCE_CSR,4,2             ; @INT_SOURCE_CSR
	.comm	_INT_MASK_CSR_RX_DONE,4,2       ; @INT_MASK_CSR_RX_DONE
	.comm	_INT_MASK_CSR_TBTT,4,2          ; @INT_MASK_CSR_TBTT
	.comm	_INT_MASK_CSR_PRE_TBTT,4,2      ; @INT_MASK_CSR_PRE_TBTT
	.comm	_INT_MASK_CSR_TX_FIFO_STATUS,4,2 ; @INT_MASK_CSR_TX_FIFO_STATUS
	.comm	_INT_MASK_CSR_AUTO_WAKEUP,4,2   ; @INT_MASK_CSR_AUTO_WAKEUP
	.comm	_INT_MASK_CSR,4,2               ; @INT_MASK_CSR
	.comm	_STATE_RADIO_IRQ_OFF,4,2        ; @STATE_RADIO_IRQ_OFF
.subsections_via_symbols
