	.file	"extr_i2c-meson.c_meson_i2c_prepare_xfer.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	meson_i2c_prepare_xfer, @function
meson_i2c_prepare_xfer:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	esi, 8
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rax, QWORD PTR 32[rdi]
	mov	rbx, rdi
	mov	rdi, QWORD PTR 8[rax]
	sub	rdi, QWORD PTR 8[rbx]
	mov	r12d, DWORD PTR [rax]
	and	r12d, DWORD PTR I2C_M_RD[rip]
	call	min@PLT
	mov	DWORD PTR [rbx], eax
	cmp	eax, 1
	jle	.L2
	xor	ebp, ebp
	.p2align 4,,10
	.p2align 3
.L3:
	mov	esi, DWORD PTR TOKEN_DATA[rip]
	mov	rdi, rbx
	add	ebp, 1
	call	meson_i2c_add_token@PLT
	mov	eax, DWORD PTR [rbx]
	lea	edx, -1[rax]
	cmp	edx, ebp
	jg	.L3
.L2:
	test	eax, eax
	je	.L4
	test	r12d, r12d
	je	.L5
	mov	rdx, QWORD PTR 32[rbx]
	cdqe
	add	rax, QWORD PTR 8[rbx]
	cmp	rax, QWORD PTR 8[rdx]
	jge	.L6
.L5:
	mov	esi, DWORD PTR TOKEN_DATA[rip]
	mov	rdi, rbx
	call	meson_i2c_add_token@PLT
.L4:
	test	r12d, r12d
	jne	.L7
	mov	rax, QWORD PTR 32[rbx]
	mov	edx, DWORD PTR [rbx]
	mov	rdi, rbx
	mov	rsi, QWORD PTR 8[rbx]
	add	rsi, QWORD PTR 16[rax]
	call	meson_i2c_put_data@PLT
.L7:
	cmp	QWORD PTR 40[rbx], 0
	je	.L8
	mov	rdx, QWORD PTR 32[rbx]
	movsx	rax, DWORD PTR [rbx]
	add	rax, QWORD PTR 8[rbx]
	cmp	rax, QWORD PTR 8[rdx]
	jge	.L18
.L8:
	mov	rax, QWORD PTR 24[rbx]
	mov	rsi, QWORD PTR REG_TOK_LIST0[rip]
	add	rsi, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR [rax]
	call	writel@PLT
	mov	rax, QWORD PTR 24[rbx]
	mov	rsi, QWORD PTR REG_TOK_LIST1[rip]
	add	rsi, QWORD PTR 16[rbx]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	edi, DWORD PTR 4[rax]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	writel@PLT
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	mov	esi, DWORD PTR TOKEN_STOP[rip]
	mov	rdi, rbx
	call	meson_i2c_add_token@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L6:
	mov	esi, DWORD PTR TOKEN_DATA_LAST[rip]
	mov	rdi, rbx
	call	meson_i2c_add_token@PLT
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	meson_i2c_prepare_xfer, .-meson_i2c_prepare_xfer
	.comm	TOKEN_STOP,4,4
	.comm	TOKEN_DATA_LAST,4,4
	.comm	TOKEN_DATA,4,4
	.comm	REG_TOK_LIST1,8,8
	.comm	REG_TOK_LIST0,8,8
	.comm	I2C_M_RD,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-meson.c_meson_i2c_prepare_xfer.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	meson_i2c_prepare_xfer, %function
meson_i2c_prepare_xfer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r3, [r0, #16]
	ldr	r1, .L22
	ldr	r0, [r3, #4]
	ldr	r2, [r4, #4]
	ldr	r7, [r3]
	ldr	r3, [r1]
	sub	r0, r0, r2
	mov	r1, #8
	and	r7, r7, r3
	bl	min
	cmp	r0, #1
	str	r0, [r4]
	ble	.L2
	mov	r5, #0
	ldr	r6, .L22+4
.L3:
	mov	r0, r4
	ldr	r1, [r6]
	bl	meson_i2c_add_token
	ldr	r0, [r4]
	add	r5, r5, #1
	sub	r3, r0, #1
	cmp	r3, r5
	bgt	.L3
.L2:
	cmp	r0, #0
	beq	.L4
	cmp	r7, #0
	beq	.L5
	ldr	r3, [r4, #16]
	ldr	r2, [r4, #4]
	ldr	r3, [r3, #4]
	add	r0, r0, r2
	cmp	r0, r3
	bge	.L6
.L5:
	ldr	r3, .L22+4
	mov	r0, r4
	ldr	r1, [r3]
	bl	meson_i2c_add_token
.L4:
	cmp	r7, #0
	bne	.L7
	ldr	r2, [r4, #16]
	ldr	r3, [r4, #4]
	ldr	r1, [r2, #8]
	mov	r0, r4
	ldr	r2, [r4]
	add	r1, r1, r3
	bl	meson_i2c_put_data
.L7:
	ldr	r3, [r4, #20]
	cmp	r3, #0
	beq	.L8
	ldm	r4, {r1, r3}
	ldr	r2, [r4, #16]
	add	r3, r3, r1
	ldr	r2, [r2, #4]
	cmp	r3, r2
	bge	.L21
.L8:
	ldr	r3, .L22+8
	ldr	r1, [r4, #8]
	ldr	r2, [r3]
	ldr	r3, [r4, #12]
	add	r1, r1, r2
	ldr	r0, [r3]
	bl	writel
	ldr	r3, .L22+12
	ldr	r1, [r4, #8]
	ldr	r2, [r3]
	ldr	r3, [r4, #12]
	add	r1, r1, r2
	ldr	r0, [r3, #4]
	pop	{r4, r5, r6, r7, r8, lr}
	b	writel
.L21:
	ldr	r3, .L22+16
	mov	r0, r4
	ldr	r1, [r3]
	bl	meson_i2c_add_token
	b	.L8
.L6:
	ldr	r3, .L22+20
	mov	r0, r4
	ldr	r1, [r3]
	bl	meson_i2c_add_token
	b	.L7
.L23:
	.align	2
.L22:
	.word	I2C_M_RD
	.word	TOKEN_DATA
	.word	REG_TOK_LIST0
	.word	REG_TOK_LIST1
	.word	TOKEN_STOP
	.word	TOKEN_DATA_LAST
	.size	meson_i2c_prepare_xfer, .-meson_i2c_prepare_xfer
	.comm	TOKEN_STOP,4,4
	.comm	TOKEN_DATA_LAST,4,4
	.comm	TOKEN_DATA,4,4
	.comm	REG_TOK_LIST1,4,4
	.comm	REG_TOK_LIST0,4,4
	.comm	I2C_M_RD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
