	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sky2_test_intr
_sky2_test_intr:                        ## @sky2_test_intr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movq	_B0_Y2_SP_ISRC2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sky2_read32
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_Y2_IS_IRQ_SW@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movq	_SKY2_HW_USE_MSI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	callq	_wake_up
	movq	_B0_CTST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CS_CL_SW_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_sky2_write8
LBB0_4:
	movq	_B0_Y2_SP_ICR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$2, %edx
	callq	_sky2_write32
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_B0_Y2_SP_ISRC2,4,2             ## @B0_Y2_SP_ISRC2
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_Y2_IS_IRQ_SW,4,2               ## @Y2_IS_IRQ_SW
	.comm	_SKY2_HW_USE_MSI,4,2            ## @SKY2_HW_USE_MSI
	.comm	_B0_CTST,4,2                    ## @B0_CTST
	.comm	_CS_CL_SW_IRQ,4,2               ## @CS_CL_SW_IRQ
	.comm	_B0_Y2_SP_ICR,4,2               ## @B0_Y2_SP_ICR
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_sky2_test_intr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sky2_test_intr
_sky2_test_intr:                        ; @sky2_test_intr
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
Lloh0:
	adrp	x8, _B0_Y2_SP_ISRC2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _B0_Y2_SP_ISRC2@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sky2_read32
	cbz	w0, LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _Y2_IS_IRQ_SW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _Y2_IS_IRQ_SW@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _SKY2_HW_USE_MSI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SKY2_HW_USE_MSI@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_wake_up
Lloh9:
	adrp	x8, _B0_CTST@GOTPAGE
Lloh10:
	ldr	x8, [x8, _B0_CTST@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _CS_CL_SW_IRQ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CS_CL_SW_IRQ@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_sky2_write8
LBB0_3:
Lloh15:
	adrp	x8, _B0_Y2_SP_ICR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _B0_Y2_SP_ICR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2
	bl	_sky2_write32
Lloh18:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh20:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_B0_Y2_SP_ISRC2,4,2             ; @B0_Y2_SP_ISRC2
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_Y2_IS_IRQ_SW,4,2               ; @Y2_IS_IRQ_SW
	.comm	_SKY2_HW_USE_MSI,4,2            ; @SKY2_HW_USE_MSI
	.comm	_B0_CTST,4,2                    ; @B0_CTST
	.comm	_CS_CL_SW_IRQ,4,2               ; @CS_CL_SW_IRQ
	.comm	_B0_Y2_SP_ICR,4,2               ; @B0_Y2_SP_ICR
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_sky2_test_intr
.subsections_via_symbols
