	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cb710_mmc_irq_handler
_cb710_mmc_irq_handler:                 ## @cb710_mmc_irq_handler
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_cb710_slot_to_mmc
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_mmc_priv
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_CB710_MMC_STATUS_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_cb710_read_port_32
	movl	%eax, %r13d
	movq	_CB710_MMC_IRQ_ENABLE_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_cb710_read_port_32
	movl	%eax, %r12d
	movq	_CB710_MMC_CONFIGB_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_cb710_read_port_32
	movl	%eax, %r15d
	movq	_CB710_MMC_CONFIG_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_cb710_read_port_32
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_cb710_slot_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	movl	%r14d, %r9d
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_CB710_MMC_S1_CARD_CHANGED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, %eax
	shll	$8, %eax
	testl	%r13d, %eax
	je	LBB0_3
## %bb.1:
	movq	_CB710_MMC_STATUS1_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_cb710_write_port_8
	movq	_CB710_MMC_IE_CISTATUS_MASK@GOTPCREL(%rip), %rax
	notl	%r12d
	testl	%r12d, (%rax)
	jne	LBB0_4
## %bb.2:
	movq	_HZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$1717986919, %rax, %rsi         ## imm = 0x66666667
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$33, %rsi
	addl	%eax, %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_mmc_detect_change
	jmp	LBB0_4
LBB0_3:
	movq	%rbx, %rdi
	callq	_cb710_slot_dev
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_spin_lock
	movq	_CB710_MMC_IE_TEST_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	___cb710_mmc_enable_irq
	movq	%r14, %rdi
	callq	_spin_unlock
LBB0_4:
	movl	$1, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CB710_MMC_STATUS_PORT,4,2      ## @CB710_MMC_STATUS_PORT
	.comm	_CB710_MMC_IRQ_ENABLE_PORT,4,2  ## @CB710_MMC_IRQ_ENABLE_PORT
	.comm	_CB710_MMC_CONFIGB_PORT,4,2     ## @CB710_MMC_CONFIGB_PORT
	.comm	_CB710_MMC_CONFIG_PORT,4,2      ## @CB710_MMC_CONFIG_PORT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"interrupt; status: %08X, ie: %08X, c2: %08X, c1: %08X\n"

	.comm	_CB710_MMC_S1_CARD_CHANGED,4,2  ## @CB710_MMC_S1_CARD_CHANGED
	.comm	_CB710_MMC_STATUS1_PORT,4,2     ## @CB710_MMC_STATUS1_PORT
	.comm	_CB710_MMC_IE_CISTATUS_MASK,4,2 ## @CB710_MMC_IE_CISTATUS_MASK
	.comm	_HZ,4,2                         ## @HZ
L_.str.1:                               ## @.str.1
	.asciz	"unknown interrupt (test)\n"

	.comm	_CB710_MMC_IE_TEST_MASK,4,2     ## @CB710_MMC_IE_TEST_MASK
	.no_dead_strip	_cb710_mmc_irq_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cb710_mmc_irq_handler
_cb710_mmc_irq_handler:                 ; @cb710_mmc_irq_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_cb710_slot_to_mmc
	mov	x20, x0
	bl	_mmc_priv
	mov	x21, x0
Lloh0:
	adrp	x8, _CB710_MMC_STATUS_PORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CB710_MMC_STATUS_PORT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_cb710_read_port_32
	mov	x23, x0
Lloh3:
	adrp	x8, _CB710_MMC_IRQ_ENABLE_PORT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CB710_MMC_IRQ_ENABLE_PORT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_cb710_read_port_32
	mov	x22, x0
Lloh6:
	adrp	x8, _CB710_MMC_CONFIGB_PORT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CB710_MMC_CONFIGB_PORT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_cb710_read_port_32
	mov	x24, x0
Lloh9:
	adrp	x8, _CB710_MMC_CONFIG_PORT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CB710_MMC_CONFIG_PORT@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_cb710_read_port_32
	mov	x25, x0
	mov	x0, x19
	bl	_cb710_slot_dev
	stp	x24, x25, [sp, #16]
	stp	x23, x22, [sp]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh14:
	adrp	x8, _CB710_MMC_S1_CARD_CHANGED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CB710_MMC_S1_CARD_CHANGED@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	tst	w23, w2, lsl #8
	b.eq	LBB0_3
; %bb.1:
Lloh17:
	adrp	x8, _CB710_MMC_STATUS1_PORT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CB710_MMC_STATUS1_PORT@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_cb710_write_port_8
Lloh20:
	adrp	x8, _CB710_MMC_IE_CISTATUS_MASK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CB710_MMC_IE_CISTATUS_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	bics	wzr, w8, w22
	b.ne	LBB0_4
; %bb.2:
Lloh23:
	adrp	x8, _HZ@GOTPAGE
Lloh24:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh25:
	ldrsw	x8, [x8]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w1, w8, w9
	mov	x0, x20
	bl	_mmc_detect_change
	b	LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_cb710_slot_dev
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	mov	x0, x21
	bl	_spin_lock
Lloh28:
	adrp	x8, _CB710_MMC_IE_TEST_MASK@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CB710_MMC_IE_TEST_MASK@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	___cb710_mmc_enable_irq
	mov	x0, x21
	bl	_spin_unlock
LBB0_4:
	mov	w0, #1
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_CB710_MMC_STATUS_PORT,4,2      ; @CB710_MMC_STATUS_PORT
	.comm	_CB710_MMC_IRQ_ENABLE_PORT,4,2  ; @CB710_MMC_IRQ_ENABLE_PORT
	.comm	_CB710_MMC_CONFIGB_PORT,4,2     ; @CB710_MMC_CONFIGB_PORT
	.comm	_CB710_MMC_CONFIG_PORT,4,2      ; @CB710_MMC_CONFIG_PORT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"interrupt; status: %08X, ie: %08X, c2: %08X, c1: %08X\n"

	.comm	_CB710_MMC_S1_CARD_CHANGED,4,2  ; @CB710_MMC_S1_CARD_CHANGED
	.comm	_CB710_MMC_STATUS1_PORT,4,2     ; @CB710_MMC_STATUS1_PORT
	.comm	_CB710_MMC_IE_CISTATUS_MASK,4,2 ; @CB710_MMC_IE_CISTATUS_MASK
	.comm	_HZ,4,2                         ; @HZ
l_.str.1:                               ; @.str.1
	.asciz	"unknown interrupt (test)\n"

	.comm	_CB710_MMC_IE_TEST_MASK,4,2     ; @CB710_MMC_IE_TEST_MASK
	.no_dead_strip	_cb710_mmc_irq_handler
.subsections_via_symbols
