	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_hsmmc_irq
_omap_hsmmc_irq:                        ## @omap_hsmmc_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, %rbx
	movq	%rsi, %rdi
	callq	_spin_lock
	cmpq	$0, 8(%rbx)
	je	LBB0_5
## %bb.1:
	movq	32(%rbx), %r14
	movl	24(%rbx), %edi
	movq	_STAT@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_OMAP_HSMMC_READ
	movl	%eax, %r15d
	movl	40(%rbx), %edi
	callq	_mmc_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%r15d, %edx
	callq	_dev_dbg
	movq	_ERR@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_6
## %bb.2:
	movq	_CMD_TIMEOUT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_7
## %bb.3:
	cmpq	$0, 16(%rbx)
	je	LBB0_11
## %bb.4:
	movq	_SRC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_omap_hsmmc_reset_controller_fsm
	movq	16(%rbx), %rax
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_5:
	movl	24(%rbx), %r14d
	movq	_STAT@GOTPCREL(%rip), %r12
	movl	(%r12), %r15d
	movl	%r14d, %edi
	movl	%r15d, %esi
	callq	_OMAP_HSMMC_READ
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_OMAP_HSMMC_WRITE
	movl	24(%rbx), %edi
	movl	(%r12), %esi
	callq	_OMAP_HSMMC_READ
	jmp	LBB0_41
LBB0_6:
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	jmp	LBB0_34
LBB0_7:
	movq	_CMD_CRC@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_13
## %bb.8:
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	_EILSEQ@GOTPCREL(%rip), %rcx
LBB0_10:
	xorl	%edx, %edx
	subl	(%rcx), %edx
	movl	%edx, (%rax)
	movl	$1, %r12d
	cmpq	$0, 32(%rbx)
	je	LBB0_15
LBB0_12:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	subl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_omap_hsmmc_dma_cleanup
	jmp	LBB0_16
LBB0_11:
	xorl	%r12d, %r12d
	cmpq	$0, 32(%rbx)
	jne	LBB0_12
LBB0_15:
	cmpq	$0, 48(%rbx)
	je	LBB0_17
LBB0_16:
	movq	$0, 48(%rbx)
	movq	_SRD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_omap_hsmmc_reset_controller_fsm
LBB0_17:
	movq	_DATA_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r15d, %eax
	jne	LBB0_19
## %bb.18:
	movq	_DATA_CRC@GOTPCREL(%rip), %rcx
	testl	%r15d, (%rcx)
	je	LBB0_28
LBB0_19:
	cmpq	$0, 32(%rbx)
	je	LBB0_22
## %bb.20:
	testl	%r15d, %eax
	jne	LBB0_25
## %bb.21:
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	jmp	LBB0_26
LBB0_22:
	cmpq	$0, 48(%rbx)
	je	LBB0_28
## %bb.23:
	testl	%r15d, %eax
	jne	LBB0_29
## %bb.24:
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	jmp	LBB0_30
LBB0_25:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
LBB0_26:
	xorl	%esi, %esi
	subl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_omap_hsmmc_dma_cleanup
	jmp	LBB0_31
LBB0_28:
	xorl	%r14d, %r14d
	jmp	LBB0_32
LBB0_13:
	xorl	%r12d, %r12d
	jmp	LBB0_17
LBB0_29:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
LBB0_30:
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movl	%ecx, (%rax)
LBB0_31:
	movq	$0, 48(%rbx)
	movq	_SRD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_omap_hsmmc_reset_controller_fsm
	movl	$1, %r14d
LBB0_32:
	movq	_CARD_ERR@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_34
## %bb.33:
	movl	40(%rbx), %edi
	callq	_mmc_dev
	movq	16(%rbx), %rcx
	movl	4(%rcx), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg
	cmpq	$0, 32(%rbx)
	movl	$1, %eax
	cmovnel	%eax, %r14d
	cmpq	$0, 16(%rbx)
	cmovnel	%eax, %r12d
LBB0_34:
	movl	24(%rbx), %edi
	movl	(%r13), %esi
	movl	%r15d, %edx
	callq	_OMAP_HSMMC_WRITE
	movl	24(%rbx), %edi
	movl	(%r13), %esi
	callq	_OMAP_HSMMC_READ
	testl	%r12d, %r12d
	je	LBB0_42
## %bb.35:
	movq	16(%rbx), %rsi
LBB0_36:
	movq	%rbx, %rdi
	callq	_omap_hsmmc_cmd_done
LBB0_37:
	testl	%r14d, %r14d
	jne	LBB0_39
## %bb.38:
	movq	_TC@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_41
LBB0_39:
	cmpq	$0, 8(%rbx)
	je	LBB0_41
## %bb.40:
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_omap_hsmmc_xfer_done
LBB0_41:
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_42:
	movq	_CC@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_37
## %bb.43:
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	jne	LBB0_36
	jmp	LBB0_37
	.cfi_endproc
                                        ## -- End function
	.comm	_STAT,4,2                       ## @STAT
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IRQ Status is %x\n"

	.comm	_ERR,4,2                        ## @ERR
	.comm	_CMD_TIMEOUT,4,2                ## @CMD_TIMEOUT
	.comm	_CMD_CRC,4,2                    ## @CMD_CRC
	.comm	_SRC,4,2                        ## @SRC
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.comm	_SRD,4,2                        ## @SRD
	.comm	_DATA_TIMEOUT,4,2               ## @DATA_TIMEOUT
	.comm	_DATA_CRC,4,2                   ## @DATA_CRC
	.comm	_CARD_ERR,4,2                   ## @CARD_ERR
L_.str.1:                               ## @.str.1
	.asciz	"Ignoring card err CMD%d\n"

	.comm	_CC,4,2                         ## @CC
	.comm	_TC,4,2                         ## @TC
	.no_dead_strip	_omap_hsmmc_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_hsmmc_irq
_omap_hsmmc_irq:                        ; @omap_hsmmc_irq
	.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	_spin_lock
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	x20, [x19, #32]
	ldr	w0, [x19, #24]
Lloh0:
	adrp	x22, _STAT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _STAT@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_OMAP_HSMMC_READ
	mov	x21, x0
	ldr	w0, [x19, #40]
	bl	_mmc_dev
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_dbg
Lloh4:
	adrp	x8, _ERR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ERR@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_6
; %bb.2:
Lloh7:
	adrp	x8, _CMD_TIMEOUT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CMD_TIMEOUT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x24, _SRD@GOTPAGE
Lloh11:
	ldr	x24, [x24, _SRD@GOTPAGEOFF]
	tst	w8, w21
	b.eq	LBB0_7
; %bb.3:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_12
; %bb.4:
Lloh12:
	adrp	x8, _SRC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SRC@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_omap_hsmmc_reset_controller_fsm
	ldr	x8, [x19, #16]
Lloh15:
	adrp	x9, _ETIMEDOUT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_10
LBB0_5:
	ldr	w20, [x19, #24]
Lloh17:
	adrp	x22, _STAT@GOTPAGE
Lloh18:
	ldr	x22, [x22, _STAT@GOTPAGEOFF]
	ldr	w21, [x22]
	mov	x0, x20
	mov	x1, x21
	bl	_OMAP_HSMMC_READ
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_OMAP_HSMMC_WRITE
	ldr	w0, [x19, #24]
	ldr	w1, [x22]
	bl	_OMAP_HSMMC_READ
	b	LBB0_32
LBB0_6:
	mov	w24, #0
	mov	w23, #0
	b	LBB0_25
LBB0_7:
Lloh19:
	adrp	x8, _CMD_CRC@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CMD_CRC@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_35
; %bb.8:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_12
; %bb.9:
Lloh22:
	adrp	x9, _EILSEQ@GOTPAGE
Lloh23:
	ldr	x9, [x9, _EILSEQ@GOTPAGEOFF]
LBB0_10:
	ldr	w9, [x9]
	neg	w9, w9
	str	w9, [x8]
	mov	w23, #1
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_13
LBB0_11:
Lloh24:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w1, w8
	mov	x0, x19
	bl	_omap_hsmmc_dma_cleanup
	b	LBB0_14
LBB0_12:
	mov	w23, #0
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_11
LBB0_13:
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_15
LBB0_14:
	str	xzr, [x19, #48]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_omap_hsmmc_reset_controller_fsm
LBB0_15:
Lloh27:
	adrp	x8, _DATA_TIMEOUT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _DATA_TIMEOUT@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	ands	w8, w8, w21
	b.ne	LBB0_17
; %bb.16:
Lloh30:
	adrp	x9, _DATA_CRC@GOTPAGE
Lloh31:
	ldr	x9, [x9, _DATA_CRC@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	tst	w9, w21
	b.eq	LBB0_22
LBB0_17:
	ldr	x9, [x19, #32]
	cbz	x9, LBB0_19
; %bb.18:
Lloh33:
	adrp	x9, _ETIMEDOUT@GOTPAGE
Lloh34:
	ldr	x9, [x9, _ETIMEDOUT@GOTPAGEOFF]
Lloh35:
	adrp	x10, _EILSEQ@GOTPAGE
Lloh36:
	ldr	x10, [x10, _EILSEQ@GOTPAGEOFF]
	cmp	w8, #0
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	neg	w1, w8
	mov	x0, x19
	bl	_omap_hsmmc_dma_cleanup
	b	LBB0_21
LBB0_19:
	ldr	x9, [x19, #48]
	cbz	x9, LBB0_22
; %bb.20:
Lloh37:
	adrp	x9, _ETIMEDOUT@GOTPAGE
Lloh38:
	ldr	x9, [x9, _ETIMEDOUT@GOTPAGEOFF]
Lloh39:
	adrp	x10, _EILSEQ@GOTPAGE
Lloh40:
	ldr	x10, [x10, _EILSEQ@GOTPAGEOFF]
	cmp	w8, #0
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	neg	w8, w8
	ldr	x9, [x19, #8]
	ldr	x9, [x9]
	str	w8, [x9]
LBB0_21:
	str	xzr, [x19, #48]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_omap_hsmmc_reset_controller_fsm
	mov	w24, #1
	b	LBB0_23
LBB0_22:
	mov	w24, #0
LBB0_23:
Lloh41:
	adrp	x8, _CARD_ERR@GOTPAGE
Lloh42:
	ldr	x8, [x8, _CARD_ERR@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_25
; %bb.24:
	ldr	w0, [x19, #40]
	bl	_mmc_dev
	ldr	x8, [x19, #16]
	ldr	w2, [x8, #4]
Lloh44:
	adrp	x1, l_.str.1@PAGE
Lloh45:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x19, #16]
	ldr	x9, [x19, #32]
	cmp	x9, #0
	csinc	w24, w24, wzr, eq
	cmp	x8, #0
	csinc	w23, w23, wzr, eq
LBB0_25:
	ldr	w0, [x19, #24]
	ldr	w1, [x22]
	mov	x2, x21
	bl	_OMAP_HSMMC_WRITE
	ldr	w0, [x19, #24]
	ldr	w1, [x22]
	bl	_OMAP_HSMMC_READ
	cbz	w23, LBB0_33
; %bb.26:
	ldr	x1, [x19, #16]
LBB0_27:
	mov	x0, x19
	bl	_omap_hsmmc_cmd_done
LBB0_28:
	cbnz	w24, LBB0_30
; %bb.29:
Lloh46:
	adrp	x8, _TC@GOTPAGE
Lloh47:
	ldr	x8, [x8, _TC@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_32
LBB0_30:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_32
; %bb.31:
	mov	x0, x19
	mov	x1, x20
	bl	_omap_hsmmc_xfer_done
LBB0_32:
	mov	x0, x19
	bl	_spin_unlock
Lloh49:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh50:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh51:
	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
LBB0_33:
Lloh52:
	adrp	x8, _CC@GOTPAGE
Lloh53:
	ldr	x8, [x8, _CC@GOTPAGEOFF]
Lloh54:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_28
; %bb.34:
	ldr	x1, [x19, #16]
	cbnz	x1, LBB0_27
	b	LBB0_28
LBB0_35:
	mov	w23, #0
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.cfi_endproc
                                        ; -- End function
	.comm	_STAT,4,2                       ; @STAT
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IRQ Status is %x\n"

	.comm	_ERR,4,2                        ; @ERR
	.comm	_CMD_TIMEOUT,4,2                ; @CMD_TIMEOUT
	.comm	_CMD_CRC,4,2                    ; @CMD_CRC
	.comm	_SRC,4,2                        ; @SRC
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.comm	_SRD,4,2                        ; @SRD
	.comm	_DATA_TIMEOUT,4,2               ; @DATA_TIMEOUT
	.comm	_DATA_CRC,4,2                   ; @DATA_CRC
	.comm	_CARD_ERR,4,2                   ; @CARD_ERR
l_.str.1:                               ; @.str.1
	.asciz	"Ignoring card err CMD%d\n"

	.comm	_CC,4,2                         ; @CC
	.comm	_TC,4,2                         ; @TC
	.no_dead_strip	_omap_hsmmc_irq
.subsections_via_symbols
