	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cafe_irq
_cafe_irq:                              ## @cafe_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rsi, %rdi
	callq	_spin_lock
	movq	_REG_IRQSTAT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_cafe_reg_read
	movl	%eax, %ebx
	movq	_ALLIRQS@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_FRAMEIRQS@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_cafe_frame_irq
LBB0_4:
	movq	_TWSIIRQS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %r12
	testl	%ebx, %edx
	je	LBB0_6
## %bb.5:
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_cafe_reg_write
	leaq	4(%r14), %rdi
	callq	_wake_up
	jmp	LBB0_6
LBB0_1:
	movq	_IRQ_NONE@GOTPCREL(%rip), %r12
LBB0_6:
	movq	%r14, %rdi
	callq	_spin_unlock
	movl	(%r12), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_IRQSTAT,4,2                ## @REG_IRQSTAT
	.comm	_ALLIRQS,4,2                    ## @ALLIRQS
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_FRAMEIRQS,4,2                  ## @FRAMEIRQS
	.comm	_TWSIIRQS,4,2                   ## @TWSIIRQS
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_cafe_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cafe_irq
_cafe_irq:                              ; @cafe_irq
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x0, x1
	bl	_spin_lock
Lloh0:
	adrp	x21, _REG_IRQSTAT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _REG_IRQSTAT@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_cafe_reg_read
Lloh2:
	adrp	x8, _ALLIRQS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ALLIRQS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.1:
	mov	x20, x0
Lloh5:
	adrp	x8, _FRAMEIRQS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FRAMEIRQS@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x19
	mov	x1, x20
	bl	_cafe_frame_irq
LBB0_3:
Lloh8:
	adrp	x8, _TWSIIRQS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TWSIIRQS@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	tst	w2, w20
	b.eq	LBB0_5
; %bb.4:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_cafe_reg_write
	add	x0, x19, #4
	bl	_wake_up
LBB0_5:
Lloh11:
	adrp	x20, _IRQ_HANDLED@GOTPAGE
Lloh12:
	ldr	x20, [x20, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x20, _IRQ_NONE@GOTPAGE
Lloh14:
	ldr	x20, [x20, _IRQ_NONE@GOTPAGEOFF]
LBB0_7:
	mov	x0, x19
	bl	_spin_unlock
	ldr	w0, [x20]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_IRQSTAT,4,2                ; @REG_IRQSTAT
	.comm	_ALLIRQS,4,2                    ; @ALLIRQS
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_FRAMEIRQS,4,2                  ; @FRAMEIRQS
	.comm	_TWSIIRQS,4,2                   ; @TWSIIRQS
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_cafe_irq
.subsections_via_symbols
