	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2400pci_toggle_irq
_rt2400pci_toggle_irq:                  ## @rt2400pci_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	%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	%esi, %r14d
	movq	%rdi, %r15
	movq	_STATE_RADIO_IRQ_OFF@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpl	%esi, (%rax)
	sete	%bl
	movq	_STATE_RADIO_IRQ_ON@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_CSR7@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_rt2x00mmio_register_read
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_rt2x00mmio_register_write
LBB0_2:
	leaq	12(%r15), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	_CSR8@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rt2x00mmio_register_read
	movl	%eax, -44(%rbp)
	movq	_CSR8_TBCN_EXPIRE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %r13
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_rt2x00_set_field32
	movq	_CSR8_TXDONE_TXRING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_rt2x00_set_field32
	movq	_CSR8_TXDONE_ATIMRING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_rt2x00_set_field32
	movq	_CSR8_TXDONE_PRIORING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_rt2x00_set_field32
	movq	_CSR8_RXDONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_rt2x00_set_field32
	movq	_CSR8@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	callq	_rt2x00mmio_register_write
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	_STATE_RADIO_IRQ_OFF@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_4
## %bb.3:
	leaq	8(%r15), %rdi
	callq	_tasklet_kill
	leaq	4(%r15), %rdi
	callq	_tasklet_kill
	movq	%r15, %rdi
	callq	_tasklet_kill
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STATE_RADIO_IRQ_OFF,4,2        ## @STATE_RADIO_IRQ_OFF
	.comm	_STATE_RADIO_IRQ_ON,4,2         ## @STATE_RADIO_IRQ_ON
	.comm	_CSR7,4,2                       ## @CSR7
	.comm	_CSR8,4,2                       ## @CSR8
	.comm	_CSR8_TBCN_EXPIRE,4,2           ## @CSR8_TBCN_EXPIRE
	.comm	_CSR8_TXDONE_TXRING,4,2         ## @CSR8_TXDONE_TXRING
	.comm	_CSR8_TXDONE_ATIMRING,4,2       ## @CSR8_TXDONE_ATIMRING
	.comm	_CSR8_TXDONE_PRIORING,4,2       ## @CSR8_TXDONE_PRIORING
	.comm	_CSR8_RXDONE,4,2                ## @CSR8_RXDONE
	.no_dead_strip	_rt2400pci_toggle_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2400pci_toggle_irq
_rt2400pci_toggle_irq:                  ; @rt2400pci_toggle_irq
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _STATE_RADIO_IRQ_OFF@GOTPAGE
Lloh1:
	ldr	x23, [x23, _STATE_RADIO_IRQ_OFF@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, w1
	cset	w21, eq
Lloh2:
	adrp	x8, _STATE_RADIO_IRQ_ON@GOTPAGE
Lloh3:
	ldr	x8, [x8, _STATE_RADIO_IRQ_ON@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x22, _CSR7@GOTPAGE
Lloh6:
	ldr	x22, [x22, _CSR7@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rt2x00mmio_register_read
	mov	x2, x0
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rt2x00mmio_register_write
LBB0_2:
	add	x22, x19, #12
	mov	x0, x22
	bl	_spin_lock_irqsave
Lloh7:
	adrp	x24, _CSR8@GOTPAGE
Lloh8:
	ldr	x24, [x24, _CSR8@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_rt2x00mmio_register_read
	str	w0, [sp, #12]
Lloh9:
	adrp	x8, _CSR8_TBCN_EXPIRE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CSR8_TBCN_EXPIRE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x21
	bl	_rt2x00_set_field32
Lloh12:
	adrp	x8, _CSR8_TXDONE_TXRING@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CSR8_TXDONE_TXRING@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x21
	bl	_rt2x00_set_field32
Lloh15:
	adrp	x8, _CSR8_TXDONE_ATIMRING@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CSR8_TXDONE_ATIMRING@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x21
	bl	_rt2x00_set_field32
Lloh18:
	adrp	x8, _CSR8_TXDONE_PRIORING@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CSR8_TXDONE_PRIORING@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x21
	bl	_rt2x00_set_field32
Lloh21:
	adrp	x8, _CSR8_RXDONE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CSR8_RXDONE@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x21
	bl	_rt2x00_set_field32
	ldr	w1, [x24]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2x00mmio_register_write
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	w8, [x23]
	cmp	w8, w20
	b.ne	LBB0_4
; %bb.3:
	add	x0, x19, #8
	bl	_tasklet_kill
	add	x0, x19, #4
	bl	_tasklet_kill
	mov	x0, x19
	bl	_tasklet_kill
LBB0_4:
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_STATE_RADIO_IRQ_OFF,4,2        ; @STATE_RADIO_IRQ_OFF
	.comm	_STATE_RADIO_IRQ_ON,4,2         ; @STATE_RADIO_IRQ_ON
	.comm	_CSR7,4,2                       ; @CSR7
	.comm	_CSR8,4,2                       ; @CSR8
	.comm	_CSR8_TBCN_EXPIRE,4,2           ; @CSR8_TBCN_EXPIRE
	.comm	_CSR8_TXDONE_TXRING,4,2         ; @CSR8_TXDONE_TXRING
	.comm	_CSR8_TXDONE_ATIMRING,4,2       ; @CSR8_TXDONE_ATIMRING
	.comm	_CSR8_TXDONE_PRIORING,4,2       ; @CSR8_TXDONE_PRIORING
	.comm	_CSR8_RXDONE,4,2                ; @CSR8_RXDONE
	.no_dead_strip	_rt2400pci_toggle_irq
.subsections_via_symbols
