	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function at91_mmc_det_irq
_at91_mmc_det_irq:                      ## @at91_mmc_det_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	callq	_irq_to_gpio
	movl	%eax, %edi
	callq	_gpio_get_value
	movl	%eax, %ebx
	xorl	%eax, %eax
	testl	%ebx, %ebx
	sete	%al
	cmpl	%eax, (%r14)
	je	LBB0_4
## %bb.1:
	movl	%eax, (%r14)
	movl	4(%r14), %edi
	callq	_mmc_hostname
	testl	%ebx, %ebx
	leaq	L_.str.1(%rip), %rcx
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rcx, %rdx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.2:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	_AT91_MCI_SDCR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_at91_mci_read
	movq	_AT91_MCI_SDCBUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_at91_mci_write
LBB0_3:
	movl	4(%r14), %ebx
	movl	$100, %edi
	callq	_msecs_to_jiffies
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_mmc_detect_change
LBB0_4:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: card %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"insert"

L_.str.2:                               ## @.str.2
	.asciz	"remove"

L_.str.3:                               ## @.str.3
	.asciz	"****** Resetting SD-card bus width ******\n"

	.comm	_AT91_MCI_SDCR,4,2              ## @AT91_MCI_SDCR
	.comm	_AT91_MCI_SDCBUS,4,2            ## @AT91_MCI_SDCBUS
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_at91_mmc_det_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function at91_mmc_det_irq
_at91_mmc_det_irq:                      ; @at91_mmc_det_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	bl	_irq_to_gpio
	bl	_gpio_get_value
	cmp	w0, #0
	cset	w8, eq
	ldr	w9, [x19]
	cmp	w9, w8
	b.eq	LBB0_4
; %bb.1:
	mov	x20, x0
	str	w8, [x19]
	ldr	w0, [x19, #4]
	bl	_mmc_hostname
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, l_.str.2@PAGE
Lloh1:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh2:
	adrp	x9, l_.str.1@PAGE
Lloh3:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	w20, #0
	csel	x8, x9, x8, eq
	stp	x0, x8, [sp]
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	cbz	w20, LBB0_3
; %bb.2:
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_debug
Lloh8:
	adrp	x8, _AT91_MCI_SDCR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AT91_MCI_SDCR@GOTPAGEOFF]
Lloh10:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_at91_mci_read
Lloh11:
	adrp	x8, _AT91_MCI_SDCBUS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AT91_MCI_SDCBUS@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	bic	w2, w0, w8
	mov	x0, x19
	mov	x1, x20
	bl	_at91_mci_write
LBB0_3:
	ldr	w19, [x19, #4]
	mov	w0, #100
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x19
	bl	_mmc_detect_change
LBB0_4:
Lloh14:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: card %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"insert"

l_.str.2:                               ; @.str.2
	.asciz	"remove"

l_.str.3:                               ; @.str.3
	.asciz	"****** Resetting SD-card bus width ******\n"

	.comm	_AT91_MCI_SDCR,4,2              ; @AT91_MCI_SDCR
	.comm	_AT91_MCI_SDCBUS,4,2            ; @AT91_MCI_SDCBUS
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_at91_mmc_det_irq
.subsections_via_symbols
