	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_mmcif_intr
_sh_mmcif_intr:                         ## @sh_mmcif_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	%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
	movq	%rsi, %rbx
	movq	%rsi, %rdi
	callq	_sh_mmcif_host_to_dev
	movq	%rax, %r14
	movl	12(%rbx), %edi
	movq	_MMCIF_CE_INT@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_sh_mmcif_readl
	movl	%eax, %r15d
	movl	12(%rbx), %edi
	movq	_MMCIF_CE_INT_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_sh_mmcif_readl
	cmpq	$0, 16(%rbx)
	movl	12(%rbx), %edi
	movl	(%r13), %esi
	je	LBB0_2
## %bb.1:
	andl	%r15d, %eax
	notl	%eax
	jmp	LBB0_3
LBB0_2:
	movq	_INT_CCS@GOTPCREL(%rip), %rcx
	andl	%r15d, %eax
	notl	%eax
	orl	(%rcx), %eax
LBB0_3:
	movl	%eax, %edx
	callq	_sh_mmcif_writel
	movl	(%r12), %esi
	movq	_MASK_CLEAN@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	andl	%r15d, %edx
	movq	%rbx, %rdi
	callq	_sh_mmcif_bitclr
	movl	(%r12), %eax
	notl	%eax
	testl	%eax, %r15d
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_dev_dbg
LBB0_5:
	movq	_INT_ERR_STS@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	jne	LBB0_7
## %bb.6:
	movq	_INT_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	testl	%eax, %r15d
	je	LBB0_8
LBB0_7:
	movl	$1, (%rbx)
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_dev_dbg
LBB0_8:
	movq	_INT_CMD12RBE@GOTPCREL(%rip), %rax
	movq	_INT_CMD12CRE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	testl	%ecx, %r15d
	je	LBB0_15
## %bb.9:
	cmpl	$0, 8(%rbx)
	je	LBB0_10
## %bb.11:
	cmpl	$0, 4(%rbx)
	je	LBB0_12
LBB0_13:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %r14
	cmpl	$0, (%rbx)
	je	LBB0_16
## %bb.14:
	movq	%rbx, %rdi
	callq	_sh_mmcif_dma_complete
	jmp	LBB0_16
LBB0_15:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_dev_dbg
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %r14
	jmp	LBB0_16
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_dev_dbg
	cmpl	$0, 4(%rbx)
	jne	LBB0_13
LBB0_12:
	movq	_IRQ_WAKE_THREAD@GOTPCREL(%rip), %r14
LBB0_16:
	movl	(%r14), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMCIF_CE_INT,4,2               ## @MMCIF_CE_INT
	.comm	_MMCIF_CE_INT_MASK,4,2          ## @MMCIF_CE_INT_MASK
	.comm	_INT_CCS,4,2                    ## @INT_CCS
	.comm	_MASK_CLEAN,4,2                 ## @MASK_CLEAN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IRQ state = 0x%08x incompletely cleared\n"

	.comm	_INT_ERR_STS,4,2                ## @INT_ERR_STS
	.comm	_INT_ALL,4,2                    ## @INT_ALL
L_.str.1:                               ## @.str.1
	.asciz	"int err state = 0x%08x\n"

	.comm	_INT_CMD12RBE,4,2               ## @INT_CMD12RBE
	.comm	_INT_CMD12CRE,4,2               ## @INT_CMD12CRE
L_.str.2:                               ## @.str.2
	.asciz	"NULL IRQ state = 0x%08x\n"

	.comm	_IRQ_WAKE_THREAD,4,2            ## @IRQ_WAKE_THREAD
L_.str.3:                               ## @.str.3
	.asciz	"Unexpected IRQ 0x%x\n"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_sh_mmcif_intr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_mmcif_intr
_sh_mmcif_intr:                         ; @sh_mmcif_intr
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x0, x1
	bl	_sh_mmcif_host_to_dev
	mov	x20, x0
	ldr	w0, [x19, #12]
Lloh0:
	adrp	x23, _MMCIF_CE_INT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MMCIF_CE_INT@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_sh_mmcif_readl
	mov	x21, x0
	ldr	w0, [x19, #12]
Lloh2:
	adrp	x22, _MMCIF_CE_INT_MASK@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MMCIF_CE_INT_MASK@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_sh_mmcif_readl
	mov	x8, x0
	ldr	x9, [x19, #16]
	ldr	w0, [x19, #12]
	ldr	w1, [x23]
	cbz	x9, LBB0_2
; %bb.1:
	and	w8, w8, w21
	mvn	w2, w8
	b	LBB0_3
LBB0_2:
Lloh4:
	adrp	x9, _INT_CCS@GOTPAGE
Lloh5:
	ldr	x9, [x9, _INT_CCS@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	and	w8, w8, w21
	orn	w2, w9, w8
LBB0_3:
	bl	_sh_mmcif_writel
	ldr	w1, [x22]
Lloh7:
	adrp	x22, _MASK_CLEAN@GOTPAGE
Lloh8:
	ldr	x22, [x22, _MASK_CLEAN@GOTPAGEOFF]
	ldr	w8, [x22]
	and	w2, w8, w21
	mov	x0, x19
	bl	_sh_mmcif_bitclr
	ldr	w8, [x22]
	bics	wzr, w21, w8
	b.eq	LBB0_5
; %bb.4:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_dbg
LBB0_5:
Lloh11:
	adrp	x8, _INT_ERR_STS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _INT_ERR_STS@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w21
	b.ne	LBB0_7
; %bb.6:
Lloh14:
	adrp	x8, _INT_ALL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _INT_ALL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	bics	wzr, w21, w8
	b.eq	LBB0_8
LBB0_7:
	mov	w8, #1
	str	w8, [x19]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_dbg
LBB0_8:
Lloh19:
	adrp	x8, _INT_CMD12RBE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _INT_CMD12RBE@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _INT_CMD12CRE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _INT_CMD12CRE@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bics	wzr, w21, w8
	b.eq	LBB0_13
; %bb.9:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_15
; %bb.10:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_16
LBB0_11:
	ldr	w8, [x19]
	cbz	w8, LBB0_14
; %bb.12:
	mov	x0, x19
	bl	_sh_mmcif_dma_complete
	b	LBB0_14
LBB0_13:
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_dbg
LBB0_14:
Lloh27:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh28:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_17
LBB0_15:
Lloh29:
	adrp	x1, l_.str.2@PAGE
Lloh30:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_dbg
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_11
LBB0_16:
Lloh31:
	adrp	x8, _IRQ_WAKE_THREAD@GOTPAGE
Lloh32:
	ldr	x8, [x8, _IRQ_WAKE_THREAD@GOTPAGEOFF]
LBB0_17:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_MMCIF_CE_INT,4,2               ; @MMCIF_CE_INT
	.comm	_MMCIF_CE_INT_MASK,4,2          ; @MMCIF_CE_INT_MASK
	.comm	_INT_CCS,4,2                    ; @INT_CCS
	.comm	_MASK_CLEAN,4,2                 ; @MASK_CLEAN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IRQ state = 0x%08x incompletely cleared\n"

	.comm	_INT_ERR_STS,4,2                ; @INT_ERR_STS
	.comm	_INT_ALL,4,2                    ; @INT_ALL
l_.str.1:                               ; @.str.1
	.asciz	"int err state = 0x%08x\n"

	.comm	_INT_CMD12RBE,4,2               ; @INT_CMD12RBE
	.comm	_INT_CMD12CRE,4,2               ; @INT_CMD12CRE
l_.str.2:                               ; @.str.2
	.asciz	"NULL IRQ state = 0x%08x\n"

	.comm	_IRQ_WAKE_THREAD,4,2            ; @IRQ_WAKE_THREAD
l_.str.3:                               ; @.str.3
	.asciz	"Unexpected IRQ 0x%x\n"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_sh_mmcif_intr
.subsections_via_symbols
