	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ergo_interrupt
_ergo_interrupt:                        ## @ergo_interrupt
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_IRQ_NONE@GOTPCREL(%rip), %r14
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.1:
	movq	%rsi, %rbx
	cmpl	$0, 32(%rsi)
	je	LBB0_7
## %bb.2:
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	_PCI9050_INTR_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	24(%rbx), %rdi
	callq	_bytein
	movq	_PCI9050_INTR_REG_STAT1@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.4:
	movq	16(%rbx), %rax
	movb	(%rax), %cl
	movb	%cl, -17(%rbp)
	movb	1(%rax), %cl
	orb	%cl, -17(%rbp)
	movb	2(%rax), %al
	orb	%al, -17(%rbp)
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %r14
	cmpl	$0, 8(%rbx)
	jne	LBB0_6
## %bb.5:
	leaq	4(%rbx), %rdi
	callq	_schedule_work
	jmp	LBB0_6
LBB0_3:
	movq	_IRQ_NONE@GOTPCREL(%rip), %r14
LBB0_6:
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
LBB0_7:
	movl	(%r14), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_PCI9050_INTR_REG,8,3           ## @PCI9050_INTR_REG
	.comm	_PCI9050_INTR_REG_STAT1,4,2     ## @PCI9050_INTR_REG_STAT1
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_ergo_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ergo_interrupt
_ergo_interrupt:                        ; @ergo_interrupt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x1, LBB0_6
; %bb.1:
	mov	x19, x1
	ldr	w8, [x1, #32]
	cbz	w8, LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #24]
Lloh0:
	adrp	x9, _PCI9050_INTR_REG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCI9050_INTR_REG@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_bytein
Lloh3:
	adrp	x8, _PCI9050_INTR_REG_STAT1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI9050_INTR_REG_STAT1@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_7
; %bb.3:
	ldr	x8, [x19, #16]
	ldrb	w9, [x8]
	strb	w9, [sp, #15]
	ldrb	w9, [x8, #1]
	ldrb	w10, [sp, #15]
	orr	w9, w10, w9
	strb	w9, [sp, #15]
	ldrb	w8, [x8, #2]
	ldrb	w9, [sp, #15]
	orr	w8, w9, w8
	strb	w8, [sp, #15]
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_5
; %bb.4:
	add	x0, x19, #4
	bl	_schedule_work
LBB0_5:
Lloh6:
	adrp	x20, _IRQ_HANDLED@GOTPAGE
Lloh7:
	ldr	x20, [x20, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh8:
	adrp	x20, _IRQ_NONE@GOTPAGE
Lloh9:
	ldr	x20, [x20, _IRQ_NONE@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh10:
	adrp	x20, _IRQ_NONE@GOTPAGE
Lloh11:
	ldr	x20, [x20, _IRQ_NONE@GOTPAGEOFF]
LBB0_8:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
LBB0_9:
	ldr	w0, [x20]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_PCI9050_INTR_REG,8,3           ; @PCI9050_INTR_REG
	.comm	_PCI9050_INTR_REG_STAT1,4,2     ; @PCI9050_INTR_REG_STAT1
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_ergo_interrupt
.subsections_via_symbols
