	.file	"extr_i2c-rcar.c_rcar_i2c_irq_recv.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	rcar_i2c_irq_recv, @function
rcar_i2c_irq_recv:
.LFB0:
	.cfi_startproc
	endbr64
	test	DWORD PTR MDR[rip], esi
	je	.L1
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, QWORD PTR 8[rdi]
	test	DWORD PTR MAT[rip], esi
	jne	.L12
	movsx	rax, DWORD PTR [rdi]
	mov	edx, DWORD PTR [rbx]
	cmp	eax, edx
	jl	.L13
.L4:
	lea	ecx, 1[rax]
	cmp	ecx, edx
	je	.L14
.L5:
	cmp	eax, edx
	jne	.L7
	mov	eax, DWORD PTR 4[rbp]
	test	DWORD PTR ID_LAST_MSG[rip], eax
	je	.L15
.L7:
	mov	edx, DWORD PTR RCAR_IRQ_ACK_RECV[rip]
	mov	esi, DWORD PTR ICMSR[rip]
	mov	rdi, rbp
	pop	rbx
	.cfi_remember_state
	.cfi_restore 3
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 8
	jmp	rcar_i2c_write@PLT
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	call	rcar_i2c_dma@PLT
	mov	eax, DWORD PTR 0[rbp]
	mov	edx, DWORD PTR [rbx]
	lea	ecx, 1[rax]
	cmp	ecx, edx
	jne	.L5
.L14:
	mov	esi, DWORD PTR ICMCR[rip]
	mov	eax, DWORD PTR 4[rbp]
	test	DWORD PTR ID_LAST_MSG[rip], eax
	je	.L6
	mov	edx, DWORD PTR RCAR_BUS_PHASE_STOP[rip]
	mov	rdi, rbp
	call	rcar_i2c_write@PLT
	mov	eax, DWORD PTR 0[rbp]
	mov	edx, DWORD PTR [rbx]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L1:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	.cfi_offset 6, -24
	.cfi_offset 12, -16
	mov	edx, DWORD PTR RCAR_BUS_PHASE_START[rip]
	mov	rdi, rbp
	call	rcar_i2c_write@PLT
	mov	eax, DWORD PTR ID_P_REP_AFTER_RD[rip]
	mov	edx, DWORD PTR [rbx]
	or	DWORD PTR 4[rbp], eax
	mov	eax, DWORD PTR 0[rbp]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rdx, QWORD PTR 8[rbx]
	mov	esi, DWORD PTR ICRXTX[rip]
	lea	r12, [rdx+rax*4]
	call	rcar_i2c_read@PLT
	mov	DWORD PTR [r12], eax
	mov	eax, DWORD PTR 0[rbp]
	mov	edx, DWORD PTR [rbx]
	add	eax, 1
	mov	DWORD PTR 0[rbp], eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L15:
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 8
	jmp	rcar_i2c_next_msg@PLT
	.cfi_endproc
.LFE0:
	.size	rcar_i2c_irq_recv, .-rcar_i2c_irq_recv
	.comm	RCAR_IRQ_ACK_RECV,4,4
	.comm	RCAR_BUS_PHASE_STOP,4,4
	.comm	RCAR_BUS_PHASE_START,4,4
	.comm	MDR,4,4
	.comm	MAT,4,4
	.comm	ID_P_REP_AFTER_RD,4,4
	.comm	ID_LAST_MSG,4,4
	.comm	ICRXTX,4,4
	.comm	ICMSR,4,4
	.comm	ICMCR,4,4
	.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_i2c-rcar.c_rcar_i2c_irq_recv.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rcar_i2c_irq_recv, %function
rcar_i2c_irq_recv:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L16
	ldr	r3, [r3]
	tst	r1, r3
	bxeq	lr
	ldr	r3, .L16+4
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, [r3]
	mov	r4, r0
	tst	r1, r3
	ldr	r6, [r0, #8]
	bne	.L12
	ldr	r5, [r0]
	ldr	r3, [r6]
	cmp	r5, r3
	blt	.L13
.L4:
	add	r2, r5, #1
	cmp	r2, r3
	beq	.L14
.L5:
	cmp	r5, r3
	bne	.L7
	ldr	r3, .L16+8
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L15
.L7:
	ldr	r2, .L16+12
	ldr	r3, .L16+16
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r2, [r2]
	ldr	r1, [r3]
	b	rcar_i2c_write
.L12:
	bl	rcar_i2c_dma
	ldr	r5, [r4]
	ldr	r3, [r6]
	add	r2, r5, #1
	cmp	r2, r3
	bne	.L5
.L14:
	ldr	r3, .L16+8
	ldr	r1, [r4, #4]
	ldr	r2, [r3]
	ldr	r3, .L16+20
	tst	r1, r2
	ldr	r1, [r3]
	beq	.L6
	ldr	r3, .L16+24
	mov	r0, r4
	ldr	r2, [r3]
	bl	rcar_i2c_write
	ldr	r3, [r6]
	ldr	r5, [r4]
	b	.L5
.L6:
	ldr	r3, .L16+28
	mov	r0, r4
	ldr	r2, [r3]
	bl	rcar_i2c_write
	ldr	r3, .L16+32
	ldr	r2, [r4, #4]
	ldr	r1, [r3]
	ldr	r5, [r4]
	orr	r2, r2, r1
	ldr	r3, [r6]
	str	r2, [r4, #4]
	b	.L5
.L13:
	ldr	r3, .L16+36
	ldr	r7, [r6, #4]
	ldr	r1, [r3]
	bl	rcar_i2c_read
	str	r0, [r7, r5, lsl #2]
	ldr	r5, [r4]
	ldr	r3, [r6]
	add	r5, r5, #1
	str	r5, [r4]
	b	.L4
.L15:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	rcar_i2c_next_msg
.L17:
	.align	2
.L16:
	.word	MDR
	.word	MAT
	.word	ID_LAST_MSG
	.word	RCAR_IRQ_ACK_RECV
	.word	ICMSR
	.word	ICMCR
	.word	RCAR_BUS_PHASE_STOP
	.word	RCAR_BUS_PHASE_START
	.word	ID_P_REP_AFTER_RD
	.word	ICRXTX
	.size	rcar_i2c_irq_recv, .-rcar_i2c_irq_recv
	.comm	RCAR_IRQ_ACK_RECV,4,4
	.comm	RCAR_BUS_PHASE_STOP,4,4
	.comm	RCAR_BUS_PHASE_START,4,4
	.comm	MDR,4,4
	.comm	MAT,4,4
	.comm	ID_P_REP_AFTER_RD,4,4
	.comm	ID_LAST_MSG,4,4
	.comm	ICRXTX,4,4
	.comm	ICMSR,4,4
	.comm	ICMCR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
