	.file	"extr_sunxi-mmc.c_sunxi_mmc_irq.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"irq: rq %p mi %08x idi %08x\n"
	.text
	.p2align 4
	.type	sunxi_mmc_irq, @function
sunxi_mmc_irq:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	r15, 16[rsi]
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	rdi, r15
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r14, QWORD PTR IRQ_HANDLED[rip]
	call	spin_lock@PLT
	mov	esi, DWORD PTR REG_IDST[rip]
	mov	rdi, rbp
	call	mmc_readl@PLT
	mov	esi, DWORD PTR REG_MISTA[rip]
	mov	rdi, rbp
	mov	r13d, eax
	call	mmc_readl@PLT
	mov	edi, DWORD PTR 12[rbp]
	mov	rbx, QWORD PTR 24[rbp]
	mov	r12d, eax
	call	mmc_dev@PLT
	mov	rdx, rbx
	mov	r8d, r13d
	mov	ecx, r12d
	mov	edi, eax
	lea	rsi, .LC0[rip]
	call	dev_dbg@PLT
	mov	rbx, QWORD PTR 24[rbp]
	test	rbx, rbx
	je	.L5
	test	DWORD PTR SDXC_IDMAC_RECEIVE_INTERRUPT[rip], r13d
	je	.L3
	mov	DWORD PTR 0[rbp], 0
.L3:
	mov	eax, DWORD PTR 4[rbp]
	or	eax, r12d
	mov	DWORD PTR 4[rbp], eax
	test	DWORD PTR SDXC_RESP_TIMEOUT[rip], eax
	je	.L4
	mov	edx, DWORD PTR SDXC_COMMAND_DONE[rip]
	test	eax, edx
	je	.L31
.L4:
	test	DWORD PTR SDXC_INTERRUPT_ERROR_BIT[rip], eax
	je	.L32
.L6:
	mov	esi, DWORD PTR REG_RINTR[rip]
	test	DWORD PTR SDXC_SDIO_INTERRUPT[rip], r12d
	je	.L33
	mov	edx, r12d
	mov	rdi, rbp
	call	mmc_writel@PLT
	mov	esi, DWORD PTR REG_IDST[rip]
	mov	edx, r13d
	mov	rdi, rbp
	call	mmc_writel@PLT
	mov	rdi, rbp
	call	sunxi_mmc_finalize_request@PLT
	mov	rdi, r15
	mov	r14, rax
	call	spin_unlock@PLT
	cmp	r14, QWORD PTR IRQ_HANDLED[rip]
	jne	.L14
	mov	edi, DWORD PTR 12[rbp]
	mov	rsi, rbx
	call	mmc_request_done@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L31:
	mov	esi, DWORD PTR REG_IMASK[rip]
	or	edx, DWORD PTR 8[rbp]
	mov	rdi, rbp
	call	mmc_writel@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	mov	esi, DWORD PTR REG_RINTR[rip]
	test	DWORD PTR SDXC_SDIO_INTERRUPT[rip], r12d
	je	.L34
	mov	edx, r12d
	mov	rdi, rbp
	call	mmc_writel@PLT
	mov	esi, DWORD PTR REG_IDST[rip]
	mov	rdi, rbp
	mov	edx, r13d
	call	mmc_writel@PLT
	mov	rdi, r15
	call	spin_unlock@PLT
.L14:
	mov	edi, DWORD PTR 12[rbp]
	call	mmc_signal_sdio_irq@PLT
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r14
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L34:
	.cfi_restore_state
	mov	edx, r12d
	mov	rdi, rbp
	call	mmc_writel@PLT
	mov	esi, DWORD PTR REG_IDST[rip]
	mov	rdi, rbp
	mov	edx, r13d
	call	mmc_writel@PLT
	mov	rdi, r15
	call	spin_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L32:
	test	DWORD PTR SDXC_INTERRUPT_DONE_BIT[rip], eax
	je	.L5
	mov	eax, DWORD PTR 0[rbp]
	test	eax, eax
	je	.L6
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L33:
	mov	edx, r12d
	mov	rdi, rbp
	call	mmc_writel@PLT
	mov	esi, DWORD PTR REG_IDST[rip]
	mov	edx, r13d
	mov	rdi, rbp
	call	mmc_writel@PLT
	mov	rdi, rbp
	call	sunxi_mmc_finalize_request@PLT
	mov	rdi, r15
	mov	r14, rax
	call	spin_unlock@PLT
	cmp	r14, QWORD PTR IRQ_HANDLED[rip]
	jne	.L1
	mov	edi, DWORD PTR 12[rbp]
	mov	rsi, rbx
	call	mmc_request_done@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	sunxi_mmc_irq, .-sunxi_mmc_irq
	.comm	SDXC_SDIO_INTERRUPT,4,4
	.comm	SDXC_RESP_TIMEOUT,4,4
	.comm	SDXC_INTERRUPT_ERROR_BIT,4,4
	.comm	SDXC_INTERRUPT_DONE_BIT,4,4
	.comm	SDXC_IDMAC_RECEIVE_INTERRUPT,4,4
	.comm	SDXC_COMMAND_DONE,4,4
	.comm	REG_RINTR,4,4
	.comm	REG_MISTA,4,4
	.comm	REG_IMASK,4,4
	.comm	REG_IDST,4,4
	.comm	IRQ_HANDLED,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_sunxi-mmc.c_sunxi_mmc_irq.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"irq: rq %p mi %08x idi %08x\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sunxi_mmc_irq, %function
sunxi_mmc_irq:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r1
	add	r8, r1, #16
	ldr	r10, .L38
	ldr	r9, .L38+4
	sub	sp, sp, #12
	mov	r0, r8
	ldr	r7, [r10]
	bl	spin_lock
	ldr	r1, [r9]
	mov	r0, r4
	bl	mmc_readl
	ldr	r3, .L38+8
	mov	r6, r0
	ldr	r1, [r3]
	mov	r0, r4
	bl	mmc_readl
	mov	r5, r0
	ldr	r0, [r4, #12]
	bl	mmc_dev
	str	r6, [sp]
	mov	r3, r5
	ldr	r2, [r4, #20]
	ldr	r1, .L38+12
	bl	dev_dbg
	ldr	fp, [r4, #20]
	cmp	fp, #0
	beq	.L5
	ldr	r3, .L38+16
	ldr	r2, .L38+20
	ldr	r3, [r3]
	ldr	r2, [r2]
	tst	r6, r3
	movne	r3, #0
	strne	r3, [r4]
	ldr	r3, [r4, #4]
	orr	r3, r5, r3
	tst	r3, r2
	str	r3, [r4, #4]
	beq	.L4
	ldr	r2, .L38+24
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L34
.L4:
	ldr	r2, .L38+28
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L35
.L6:
	ldr	r3, .L38+32
	ldr	r2, .L38+36
	ldr	r3, [r3]
	ldr	r1, [r2]
	tst	r5, r3
	beq	.L36
	mov	r2, r5
	mov	r0, r4
	bl	mmc_writel
	mov	r2, r6
	ldr	r1, [r9]
	mov	r0, r4
	bl	mmc_writel
	mov	r0, r4
	bl	sunxi_mmc_finalize_request
	mov	r7, r0
	mov	r0, r8
	bl	spin_unlock
	ldr	r3, [r10]
	cmp	r7, r3
	bne	.L14
	mov	r1, fp
	ldr	r0, [r4, #12]
	bl	mmc_request_done
	b	.L14
.L34:
	ldr	r1, [r4, #8]
	ldr	r3, .L38+40
	orr	r2, r2, r1
	mov	r0, r4
	ldr	r1, [r3]
	bl	mmc_writel
.L5:
	ldr	r3, .L38+32
	ldr	r2, .L38+36
	ldr	r3, [r3]
	ldr	r1, [r2]
	tst	r5, r3
	beq	.L37
	mov	r2, r5
	mov	r0, r4
	bl	mmc_writel
	mov	r2, r6
	mov	r0, r4
	ldr	r1, [r9]
	bl	mmc_writel
	mov	r0, r8
	bl	spin_unlock
.L14:
	ldr	r0, [r4, #12]
	bl	mmc_signal_sdio_irq
.L1:
	mov	r0, r7
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L37:
	mov	r2, r5
	mov	r0, r4
	bl	mmc_writel
	mov	r2, r6
	ldr	r1, [r9]
	mov	r0, r4
	bl	mmc_writel
	mov	r0, r8
	bl	spin_unlock
	mov	r0, r7
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L35:
	ldr	r2, .L38+44
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L5
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L6
	b	.L5
.L36:
	mov	r2, r5
	mov	r0, r4
	bl	mmc_writel
	mov	r2, r6
	ldr	r1, [r9]
	mov	r0, r4
	bl	mmc_writel
	mov	r0, r4
	bl	sunxi_mmc_finalize_request
	mov	r7, r0
	mov	r0, r8
	bl	spin_unlock
	ldr	r3, [r10]
	cmp	r7, r3
	bne	.L1
	mov	r1, fp
	ldr	r0, [r4, #12]
	bl	mmc_request_done
	b	.L1
.L39:
	.align	2
.L38:
	.word	IRQ_HANDLED
	.word	REG_IDST
	.word	REG_MISTA
	.word	.LC0
	.word	SDXC_IDMAC_RECEIVE_INTERRUPT
	.word	SDXC_RESP_TIMEOUT
	.word	SDXC_COMMAND_DONE
	.word	SDXC_INTERRUPT_ERROR_BIT
	.word	SDXC_SDIO_INTERRUPT
	.word	REG_RINTR
	.word	REG_IMASK
	.word	SDXC_INTERRUPT_DONE_BIT
	.size	sunxi_mmc_irq, .-sunxi_mmc_irq
	.comm	SDXC_SDIO_INTERRUPT,4,4
	.comm	SDXC_RESP_TIMEOUT,4,4
	.comm	SDXC_INTERRUPT_ERROR_BIT,4,4
	.comm	SDXC_INTERRUPT_DONE_BIT,4,4
	.comm	SDXC_IDMAC_RECEIVE_INTERRUPT,4,4
	.comm	SDXC_COMMAND_DONE,4,4
	.comm	REG_RINTR,4,4
	.comm	REG_MISTA,4,4
	.comm	REG_IMASK,4,4
	.comm	REG_IDST,4,4
	.comm	IRQ_HANDLED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
