	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tmio_mmc_irq                   ## -- Begin function tmio_mmc_irq
	.p2align	4, 0x90
_tmio_mmc_irq:                          ## @tmio_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	_CTL_STATUS@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_sd_ctrl_read16_and_16_as_32
	movl	%eax, %r14d
	movq	_TMIO_MASK_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r15), %ebx
	notl	%ebx
	andl	%edx, %ebx
	andl	%r14d, %ebx
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_sd_ctrl_write32_as_16_and_16
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	___tmio_mmc_card_detect_irq
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %r12
	testq	%rax, %rax
	jne	LBB0_5
## %bb.1:
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	___tmio_mmc_sdcard_irq
	testq	%rax, %rax
	jne	LBB0_5
## %bb.2:
	movq	%r15, %rdi
	callq	___tmio_mmc_sdio_irq
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:
	movq	_IRQ_NONE@GOTPCREL(%rip), %r12
	jmp	LBB0_5
LBB0_3:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %r12
LBB0_5:
	movl	(%r12), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CTL_STATUS,4,2                 ## @CTL_STATUS
	.comm	_TMIO_MASK_IRQ,4,2              ## @TMIO_MASK_IRQ
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tmio_mmc_irq                   ; -- Begin function tmio_mmc_irq
	.p2align	2
_tmio_mmc_irq:                          ; @tmio_mmc_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
Lloh0:
	adrp	x22, _CTL_STATUS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CTL_STATUS@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_sd_ctrl_read16_and_16_as_32
	mov	x20, x0
Lloh2:
	adrp	x8, _TMIO_MASK_IRQ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TMIO_MASK_IRQ@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	and	w8, w2, w0
	ldr	w9, [x19]
	bic	w21, w8, w9
	ldr	w1, [x22]
	mov	x0, x19
	bl	_sd_ctrl_write32_as_16_and_16
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	___tmio_mmc_card_detect_irq
	cbz	x0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x20, _IRQ_HANDLED@GOTPAGE
Lloh6:
	ldr	x20, [x20, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	___tmio_mmc_sdcard_irq
Lloh7:
	adrp	x20, _IRQ_HANDLED@GOTPAGE
Lloh8:
	ldr	x20, [x20, _IRQ_HANDLED@GOTPAGEOFF]
	cbnz	x0, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	___tmio_mmc_sdio_irq
Lloh9:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
	cmp	x0, #0
	csel	x20, x8, x20, eq
LBB0_4:
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_CTL_STATUS,4,2                 ; @CTL_STATUS
	.comm	_TMIO_MASK_IRQ,4,2              ; @TMIO_MASK_IRQ
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
.subsections_via_symbols
