	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function meson_mmc_irq
_meson_mmc_irq:                         ## @meson_mmc_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	%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, %r14
	movq	_IRQ_NONE@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_SD_EMMC_IRQ_EN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rsi), %rdi
	callq	_readl
	movl	%eax, %ebx
	movq	_SD_EMMC_STATUS@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	8(%r14), %rdi
	callq	_readl
	movl	%eax, %r13d
	andl	%ebx, %r13d
	je	LBB0_4
## %bb.1:
	xorl	%edi, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_5
## %bb.2:
	xorl	%edi, %edi
	cmpq	$0, 24(%r14)
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_5
## %bb.7:
	movq	(%r15), %rsi
	movq	%r14, %r15
	addq	8(%r14), %rsi
	movl	%r13d, %edi
	callq	_writel
	movq	24(%r14), %r14
	movq	8(%r14), %r12
	movl	$0, (%r14)
	movq	_IRQ_CRC_ERR@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_9
## %bb.8:
	movl	16(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_4:
	movl	16(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_5:
	movq	(%r12), %rbx
LBB0_6:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_IRQ_TIMEOUTS@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_15
## %bb.10:
	movl	16(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r12d, %r12d
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
LBB0_11:
	subl	(%rax), %r12d
	movl	%r12d, (%r14)
	movq	_IRQ_WAKE_THREAD@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	testl	%r12d, %r12d
	je	LBB0_13
LBB0_12:
	movq	_SD_EMMC_START@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	8(%r15), %rdi
	callq	_readl
	movq	_START_DESC_BUSY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	movq	(%r12), %rsi
	addq	8(%r15), %rsi
	callq	_writel
LBB0_13:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_6
## %bb.14:
	movl	(%r15), %edi
	movl	4(%r14), %esi
	callq	_meson_mmc_request_done
	jmp	LBB0_6
LBB0_15:
	movl	(%r15), %edi
	movq	%r14, %rsi
	callq	_meson_mmc_read_resp
	movq	_IRQ_SDIO@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_17
## %bb.16:
	movl	16(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_17:
	movq	_IRQ_END_OF_CHAIN@GOTPCREL(%rip), %rax
	movq	_IRQ_RESP_STATUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%r13d, %ecx
	je	LBB0_25
## %bb.18:
	testq	%r12, %r12
	je	LBB0_21
## %bb.19:
	cmpl	$0, (%r14)
	jne	LBB0_21
## %bb.20:
	movl	8(%r12), %eax
	imull	4(%r12), %eax
	movl	%eax, (%r12)
LBB0_21:
	movq	%r12, %rdi
	callq	_meson_mmc_bounce_buf_read
	testq	%rax, %rax
	jne	LBB0_23
## %bb.22:
	movq	%r14, %rdi
	callq	_meson_mmc_get_next_command
	testq	%rax, %rax
	je	LBB0_26
LBB0_23:
	movq	_IRQ_WAKE_THREAD@GOTPCREL(%rip), %rax
LBB0_24:
	movq	(%rax), %rbx
LBB0_25:
	movl	(%r14), %r12d
	testl	%r12d, %r12d
	jne	LBB0_12
	jmp	LBB0_13
LBB0_26:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_NONE,8,3                   ## @IRQ_NONE
	.comm	_SD_EMMC_IRQ_EN,8,3             ## @SD_EMMC_IRQ_EN
	.comm	_SD_EMMC_STATUS,8,3             ## @SD_EMMC_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unexpected IRQ! irq_en 0x%08x - status 0x%08x\n"

	.comm	_IRQ_CRC_ERR,4,2                ## @IRQ_CRC_ERR
L_.str.1:                               ## @.str.1
	.asciz	"CRC Error - status 0x%08x\n"

	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.comm	_IRQ_WAKE_THREAD,8,3            ## @IRQ_WAKE_THREAD
	.comm	_IRQ_TIMEOUTS,4,2               ## @IRQ_TIMEOUTS
L_.str.2:                               ## @.str.2
	.asciz	"Timeout - status 0x%08x\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_IRQ_SDIO,4,2                   ## @IRQ_SDIO
L_.str.3:                               ## @.str.3
	.asciz	"IRQ: SDIO TODO.\n"

	.comm	_IRQ_HANDLED,8,3                ## @IRQ_HANDLED
	.comm	_IRQ_END_OF_CHAIN,4,2           ## @IRQ_END_OF_CHAIN
	.comm	_IRQ_RESP_STATUS,4,2            ## @IRQ_RESP_STATUS
	.comm	_SD_EMMC_START,8,3              ## @SD_EMMC_START
	.comm	_START_DESC_BUSY,4,2            ## @START_DESC_BUSY
	.no_dead_strip	_meson_mmc_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function meson_mmc_irq
_meson_mmc_irq:                         ; @meson_mmc_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x23, _IRQ_NONE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _IRQ_NONE@GOTPAGEOFF]
	ldr	x21, [x23]
	ldr	x8, [x1, #8]
Lloh2:
	adrp	x9, _SD_EMMC_IRQ_EN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SD_EMMC_IRQ_EN@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x20, x0
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x24, _SD_EMMC_STATUS@GOTPAGE
Lloh6:
	ldr	x24, [x24, _SD_EMMC_STATUS@GOTPAGEOFF]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readl
                                        ; kill: def $w0 killed $w0 def $x0
	ands	w22, w0, w20
	b.eq	LBB0_5
; %bb.1:
	mov	w0, #0
	bl	_WARN_ON
	cbnz	x0, LBB0_6
; %bb.2:
	ldr	x8, [x19, #24]
	cmp	x8, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_6
; %bb.3:
	ldr	x8, [x19, #8]
	ldr	x9, [x24]
	add	x1, x9, x8
	mov	x0, x22
	bl	_writel
	ldr	x20, [x19, #24]
	ldr	x23, [x20, #8]
	str	wzr, [x20]
Lloh7:
	adrp	x8, _IRQ_CRC_ERR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IRQ_CRC_ERR@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x24, _IRQ_HANDLED@GOTPAGE
Lloh11:
	ldr	x24, [x24, _IRQ_HANDLED@GOTPAGEOFF]
	tst	w8, w22
	b.eq	LBB0_8
; %bb.4:
	ldr	w0, [x19, #16]
	str	x22, [sp]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
Lloh14:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
	b	LBB0_10
LBB0_5:
	ldr	w8, [x19, #16]
	stp	x20, x0, [sp]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	bl	_dev_dbg
LBB0_6:
	ldr	x21, [x23]
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
Lloh18:
	adrp	x8, _IRQ_TIMEOUTS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IRQ_TIMEOUTS@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_14
; %bb.9:
	ldr	w0, [x19, #16]
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	str	x22, [sp]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
Lloh23:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x20]
Lloh25:
	adrp	x9, _IRQ_WAKE_THREAD@GOTPAGE
Lloh26:
	ldr	x9, [x9, _IRQ_WAKE_THREAD@GOTPAGEOFF]
Lloh27:
	ldr	x21, [x9]
	cbz	w8, LBB0_12
LBB0_11:
	ldr	x8, [x19, #8]
Lloh28:
	adrp	x22, _SD_EMMC_START@GOTPAGE
Lloh29:
	ldr	x22, [x22, _SD_EMMC_START@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
Lloh30:
	adrp	x8, _START_DESC_BUSY@GOTPAGE
Lloh31:
	ldr	x8, [x8, _START_DESC_BUSY@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	bic	w0, w0, w8
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel
LBB0_12:
	ldr	x8, [x24]
	cmp	x21, x8
	b.ne	LBB0_7
; %bb.13:
	ldr	w0, [x19]
	ldr	w1, [x20, #4]
	bl	_meson_mmc_request_done
	b	LBB0_7
LBB0_14:
	ldr	w0, [x19]
	mov	x1, x20
	bl	_meson_mmc_read_resp
Lloh33:
	adrp	x8, _IRQ_SDIO@GOTPAGE
Lloh34:
	ldr	x8, [x8, _IRQ_SDIO@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_16
; %bb.15:
	ldr	w0, [x19, #16]
Lloh36:
	adrp	x1, l_.str.3@PAGE
Lloh37:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_dbg
	ldr	x21, [x24]
LBB0_16:
Lloh38:
	adrp	x8, _IRQ_END_OF_CHAIN@GOTPAGE
Lloh39:
	ldr	x8, [x8, _IRQ_END_OF_CHAIN@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
Lloh41:
	adrp	x9, _IRQ_RESP_STATUS@GOTPAGE
Lloh42:
	ldr	x9, [x9, _IRQ_RESP_STATUS@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w22
	b.eq	LBB0_23
; %bb.17:
	cbz	x23, LBB0_20
; %bb.18:
	ldr	w8, [x20]
	cbnz	w8, LBB0_20
; %bb.19:
	ldp	w8, w9, [x23, #4]
	mul	w8, w9, w8
	str	w8, [x23]
LBB0_20:
	mov	x0, x23
	bl	_meson_mmc_bounce_buf_read
	cbnz	x0, LBB0_22
; %bb.21:
	mov	x0, x20
	bl	_meson_mmc_get_next_command
	cbz	x0, LBB0_24
LBB0_22:
Lloh44:
	adrp	x8, _IRQ_WAKE_THREAD@GOTPAGE
Lloh45:
	ldr	x8, [x8, _IRQ_WAKE_THREAD@GOTPAGEOFF]
Lloh46:
	ldr	x21, [x8]
LBB0_23:
	ldr	w8, [x20]
	cbnz	w8, LBB0_11
	b	LBB0_12
LBB0_24:
	ldr	x21, [x24]
	b	LBB0_23
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_NONE,8,3                   ; @IRQ_NONE
	.comm	_SD_EMMC_IRQ_EN,8,3             ; @SD_EMMC_IRQ_EN
	.comm	_SD_EMMC_STATUS,8,3             ; @SD_EMMC_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unexpected IRQ! irq_en 0x%08x - status 0x%08x\n"

	.comm	_IRQ_CRC_ERR,4,2                ; @IRQ_CRC_ERR
l_.str.1:                               ; @.str.1
	.asciz	"CRC Error - status 0x%08x\n"

	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.comm	_IRQ_WAKE_THREAD,8,3            ; @IRQ_WAKE_THREAD
	.comm	_IRQ_TIMEOUTS,4,2               ; @IRQ_TIMEOUTS
l_.str.2:                               ; @.str.2
	.asciz	"Timeout - status 0x%08x\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_IRQ_SDIO,4,2                   ; @IRQ_SDIO
l_.str.3:                               ; @.str.3
	.asciz	"IRQ: SDIO TODO.\n"

	.comm	_IRQ_HANDLED,8,3                ; @IRQ_HANDLED
	.comm	_IRQ_END_OF_CHAIN,4,2           ; @IRQ_END_OF_CHAIN
	.comm	_IRQ_RESP_STATUS,4,2            ; @IRQ_RESP_STATUS
	.comm	_SD_EMMC_START,8,3              ; @SD_EMMC_START
	.comm	_START_DESC_BUSY,4,2            ; @START_DESC_BUSY
	.no_dead_strip	_meson_mmc_irq
.subsections_via_symbols
