	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtsx_pci_isr
_rtsx_pci_isr:                          ## @rtsx_pci_isr
	.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
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r15
	leaq	12(%rsi), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movq	_RTSX_BIPR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_rtsx_pci_readl
	movl	%eax, %ebx
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_rtsx_pci_writel
	movl	(%r15), %r13d
	testl	%ebx, %r13d
	je	LBB0_3
## %bb.4:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %r12
	cmpl	$-1, %ebx
	je	LBB0_27
## %bb.5:
	orl	$8388607, %r13d                 ## imm = 0x7FFFFF
	andl	%ebx, %r13d
	movq	_SD_OC_INT@GOTPCREL(%rip), %rbx
	testl	%r13d, (%rbx)
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_rtsx_pci_process_ocp_interrupt
LBB0_7:
	movq	_SD_INT@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_12
## %bb.8:
	movq	_SD_EXIST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r13d, %eax
	je	LBB0_10
## %bb.9:
	orl	%eax, 4(%r15)
	jmp	LBB0_11
LBB0_1:
	movq	_IRQ_NONE@GOTPCREL(%rip), %r12
	jmp	LBB0_28
LBB0_3:
	movq	_IRQ_NONE@GOTPCREL(%rip), %r12
	jmp	LBB0_27
LBB0_10:
	orl	%eax, 8(%r15)
	notl	%eax
	andl	%eax, 4(%r15)
LBB0_11:
	movq	$0, 40(%r15)
LBB0_12:
	movq	_MS_INT@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_16
## %bb.13:
	movq	_MS_EXIST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r13d, %eax
	je	LBB0_15
## %bb.14:
	orl	%eax, 4(%r15)
	jmp	LBB0_16
LBB0_15:
	orl	%eax, 8(%r15)
	notl	%eax
	andl	%eax, 4(%r15)
LBB0_16:
	movq	_NEED_COMPLETE_INT@GOTPCREL(%rip), %rcx
	movq	_DELINK_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%rcx), %ecx
	orl	%eax, %ecx
	testl	%r13d, %ecx
	je	LBB0_23
## %bb.17:
	movq	_TRANS_FAIL_INT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	testl	%r13d, %eax
	je	LBB0_19
## %bb.18:
	movq	_TRANS_RESULT_FAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_19:
	movq	_TRANS_OK_INT@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_23
## %bb.20:
	movq	_TRANS_RESULT_OK@GOTPCREL(%rip), %rax
LBB0_21:
	movl	(%rax), %eax
	movl	%eax, 32(%r15)
	movq	24(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_23
## %bb.22:
	callq	_complete
LBB0_23:
	cmpl	$0, 4(%r15)
	jne	LBB0_25
## %bb.24:
	cmpl	$0, 8(%r15)
	je	LBB0_27
LBB0_25:
	testl	%r13d, (%rbx)
	jne	LBB0_27
## %bb.26:
	addq	$16, %r15
	movl	$200, %edi
	callq	_msecs_to_jiffies
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_schedule_delayed_work
LBB0_27:
	movq	%r14, %rdi
	callq	_spin_unlock
LBB0_28:
	movl	(%r12), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_RTSX_BIPR,4,2                  ## @RTSX_BIPR
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_SD_OC_INT,4,2                  ## @SD_OC_INT
	.comm	_SD_INT,4,2                     ## @SD_INT
	.comm	_SD_EXIST,4,2                   ## @SD_EXIST
	.comm	_MS_INT,4,2                     ## @MS_INT
	.comm	_MS_EXIST,4,2                   ## @MS_EXIST
	.comm	_NEED_COMPLETE_INT,4,2          ## @NEED_COMPLETE_INT
	.comm	_DELINK_INT,4,2                 ## @DELINK_INT
	.comm	_TRANS_FAIL_INT,4,2             ## @TRANS_FAIL_INT
	.comm	_TRANS_RESULT_FAIL,4,2          ## @TRANS_RESULT_FAIL
	.comm	_TRANS_OK_INT,4,2               ## @TRANS_OK_INT
	.comm	_TRANS_RESULT_OK,4,2            ## @TRANS_RESULT_OK
	.no_dead_strip	_rtsx_pci_isr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtsx_pci_isr
_rtsx_pci_isr:                          ; @rtsx_pci_isr
	.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
	cbz	x1, LBB0_8
; %bb.1:
	mov	x20, x1
	add	x19, x1, #12
	mov	x0, x19
	bl	_spin_lock
Lloh0:
	adrp	x22, _RTSX_BIPR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _RTSX_BIPR@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_rtsx_pci_readl
	mov	x21, x0
	ldr	w1, [x22]
	mov	x0, x20
	mov	x2, x21
	bl	_rtsx_pci_writel
	ldr	w8, [x20]
	tst	w8, w21
	b.eq	LBB0_9
; %bb.2:
	cmn	w21, #1
	b.eq	LBB0_28
; %bb.3:
	orr	w8, w8, #0x7fffff
	and	w21, w8, w21
Lloh2:
	adrp	x22, _SD_OC_INT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SD_OC_INT@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w21
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_rtsx_pci_process_ocp_interrupt
LBB0_5:
Lloh4:
	adrp	x8, _SD_INT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SD_INT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_12
; %bb.6:
Lloh7:
	adrp	x8, _SD_EXIST@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SD_EXIST@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_10
; %bb.7:
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
	b	LBB0_11
LBB0_8:
Lloh10:
	adrp	x20, _IRQ_NONE@GOTPAGE
Lloh11:
	ldr	x20, [x20, _IRQ_NONE@GOTPAGEOFF]
	b	LBB0_30
LBB0_9:
Lloh12:
	adrp	x20, _IRQ_NONE@GOTPAGE
Lloh13:
	ldr	x20, [x20, _IRQ_NONE@GOTPAGEOFF]
	b	LBB0_29
LBB0_10:
	ldp	w10, w9, [x20, #4]
	orr	w9, w9, w8
	bic	w8, w10, w8
	str	w9, [x20, #8]
LBB0_11:
	str	w8, [x20, #4]
	str	xzr, [x20, #40]
LBB0_12:
Lloh14:
	adrp	x8, _MS_INT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MS_INT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_17
; %bb.13:
Lloh17:
	adrp	x8, _MS_EXIST@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MS_EXIST@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_15
; %bb.14:
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
	b	LBB0_16
LBB0_15:
	ldp	w10, w9, [x20, #4]
	orr	w9, w9, w8
	bic	w8, w10, w8
	str	w9, [x20, #8]
LBB0_16:
	str	w8, [x20, #4]
LBB0_17:
Lloh20:
	adrp	x8, _NEED_COMPLETE_INT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NEED_COMPLETE_INT@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x8]
Lloh23:
	adrp	x8, _DELINK_INT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DELINK_INT@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	orr	w9, w8, w9
	tst	w9, w21
	b.eq	LBB0_24
; %bb.18:
Lloh26:
	adrp	x9, _TRANS_FAIL_INT@GOTPAGE
Lloh27:
	ldr	x9, [x9, _TRANS_FAIL_INT@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w21
	b.eq	LBB0_20
; %bb.19:
Lloh29:
	adrp	x8, _TRANS_RESULT_FAIL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _TRANS_RESULT_FAIL@GOTPAGEOFF]
	b	LBB0_22
LBB0_20:
Lloh31:
	adrp	x8, _TRANS_OK_INT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _TRANS_OK_INT@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_24
; %bb.21:
Lloh34:
	adrp	x8, _TRANS_RESULT_OK@GOTPAGE
Lloh35:
	ldr	x8, [x8, _TRANS_RESULT_OK@GOTPAGEOFF]
LBB0_22:
	ldr	w8, [x8]
	str	w8, [x20, #32]
	ldr	x0, [x20, #24]
	cbz	x0, LBB0_24
; %bb.23:
	bl	_complete
LBB0_24:
	ldr	w8, [x20, #4]
	cbnz	w8, LBB0_26
; %bb.25:
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_28
LBB0_26:
	ldr	w8, [x22]
	tst	w8, w21
	b.ne	LBB0_28
; %bb.27:
	add	x20, x20, #16
	mov	w0, #200
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x20
	bl	_schedule_delayed_work
LBB0_28:
Lloh36:
	adrp	x20, _IRQ_HANDLED@GOTPAGE
Lloh37:
	ldr	x20, [x20, _IRQ_HANDLED@GOTPAGEOFF]
LBB0_29:
	mov	x0, x19
	bl	_spin_unlock
LBB0_30:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_RTSX_BIPR,4,2                  ; @RTSX_BIPR
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_SD_OC_INT,4,2                  ; @SD_OC_INT
	.comm	_SD_INT,4,2                     ; @SD_INT
	.comm	_SD_EXIST,4,2                   ; @SD_EXIST
	.comm	_MS_INT,4,2                     ; @MS_INT
	.comm	_MS_EXIST,4,2                   ; @MS_EXIST
	.comm	_NEED_COMPLETE_INT,4,2          ; @NEED_COMPLETE_INT
	.comm	_DELINK_INT,4,2                 ; @DELINK_INT
	.comm	_TRANS_FAIL_INT,4,2             ; @TRANS_FAIL_INT
	.comm	_TRANS_RESULT_FAIL,4,2          ; @TRANS_RESULT_FAIL
	.comm	_TRANS_OK_INT,4,2               ; @TRANS_OK_INT
	.comm	_TRANS_RESULT_OK,4,2            ; @TRANS_RESULT_OK
	.no_dead_strip	_rtsx_pci_isr
.subsections_via_symbols
