	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pluto_irq
_pluto_irq:                             ## @pluto_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	_REG_TSCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pluto_readreg
	movl	%eax, %ebx
	movq	_TSCR_DE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_TSCR_OVR@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movl	%eax, %edx
	orl	%ecx, %edx
	testl	%ebx, %edx
	je	LBB0_1
## %bb.2:
	cmpl	$-1, %ebx
	je	LBB0_3
## %bb.6:
	testl	%ebx, %ecx
	je	LBB0_11
## %bb.7:
	movq	_TSCR_NBPACKETS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	%ebx, %esi
	sarl	$24, %esi
	movq	%r14, %rdi
	callq	_pluto_dma_end
	movq	8(%r14), %rdx
	testl	%ebx, (%r15)
	je	LBB0_9
## %bb.8:
	incq	%rdx
	movq	%rdx, 8(%r14)
LBB0_9:
	testq	%rdx, %rdx
	je	LBB0_13
## %bb.10:
	movq	16(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_pluto_reset_ts
	movq	$0, 8(%r14)
	jmp	LBB0_13
LBB0_1:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_3:
	cmpl	$0, (%r14)
	jne	LBB0_5
## %bb.4:
	movq	16(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_5:
	movl	$1, (%r14)
	jmp	LBB0_14
LBB0_11:
	testl	%ebx, %eax
	je	LBB0_13
## %bb.12:
	incq	8(%r14)
LBB0_13:
	movq	_TSCR_IACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	%ebx, %esi
	movq	%r14, %rdi
	callq	_pluto_write_tscr
LBB0_14:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_TSCR,4,2                   ## @REG_TSCR
	.comm	_TSCR_DE,4,2                    ## @TSCR_DE
	.comm	_TSCR_OVR,4,2                   ## @TSCR_OVR
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"card has hung or been ejected.\n"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_TSCR_NBPACKETS,4,2             ## @TSCR_NBPACKETS
L_.str.1:                               ## @.str.1
	.asciz	"overflow irq (%d)\n"

	.comm	_TSCR_IACK,4,2                  ## @TSCR_IACK
	.no_dead_strip	_pluto_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pluto_irq
_pluto_irq:                             ; @pluto_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	x19, x1
Lloh0:
	adrp	x8, _REG_TSCR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_TSCR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pluto_readreg
Lloh3:
	adrp	x8, _TSCR_DE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TSCR_DE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
Lloh6:
	adrp	x21, _TSCR_OVR@GOTPAGE
Lloh7:
	ldr	x21, [x21, _TSCR_OVR@GOTPAGEOFF]
	ldr	w8, [x21]
	orr	w10, w8, w9
	tst	w10, w0
	b.eq	LBB0_7
; %bb.1:
	mov	x20, x0
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.2:
	tst	w9, w20
	b.eq	LBB0_11
; %bb.3:
Lloh8:
	adrp	x8, _TSCR_NBPACKETS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TSCR_NBPACKETS@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	and	w8, w8, w20
	asr	w1, w8, #24
	mov	x0, x19
	bl	_pluto_dma_end
	ldr	w9, [x21]
	ldr	x8, [x19, #8]
	tst	w9, w20
	b.eq	LBB0_5
; %bb.4:
	add	x8, x8, #1
	str	x8, [x19, #8]
LBB0_5:
	cbz	x8, LBB0_13
; %bb.6:
	ldr	x0, [x19, #16]
	str	x8, [sp]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	mov	x0, x19
	mov	w1, #1
	bl	_pluto_reset_ts
	str	xzr, [x19, #8]
	b	LBB0_13
LBB0_7:
Lloh13:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
	b	LBB0_15
LBB0_8:
	ldr	w8, [x19]
	cbnz	w8, LBB0_10
; %bb.9:
	ldr	x0, [x19, #16]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_10:
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_14
LBB0_11:
	tst	w8, w20
	b.eq	LBB0_13
; %bb.12:
	ldr	x8, [x19, #8]
	add	x8, x8, #1
	str	x8, [x19, #8]
LBB0_13:
Lloh17:
	adrp	x8, _TSCR_IACK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TSCR_IACK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	orr	w1, w8, w20
	mov	x0, x19
	bl	_pluto_write_tscr
LBB0_14:
Lloh20:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
LBB0_15:
	ldr	w0, [x8]
	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	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_TSCR,4,2                   ; @REG_TSCR
	.comm	_TSCR_DE,4,2                    ; @TSCR_DE
	.comm	_TSCR_OVR,4,2                   ; @TSCR_OVR
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"card has hung or been ejected.\n"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_TSCR_NBPACKETS,4,2             ; @TSCR_NBPACKETS
l_.str.1:                               ; @.str.1
	.asciz	"overflow irq (%d)\n"

	.comm	_TSCR_IACK,4,2                  ; @TSCR_IACK
	.no_dead_strip	_pluto_irq
.subsections_via_symbols
