	.file	"extr_i2c-xlp9xx.c_xlp9xx_i2c_fill_tx_fifo.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	xlp9xx_i2c_fill_tx_fifo, @function
xlp9xx_i2c_fill_tx_fifo:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rbx, QWORD PTR [rdi]
	mov	esi, DWORD PTR XLP9XX_I2C_FIFO_SIZE[rip]
	mov	edi, DWORD PTR 8[rdi]
	call	min@PLT
	mov	r13, rax
	test	rax, rax
	je	.L2
	lea	r12, [rbx+rax*4]
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edx, DWORD PTR [rbx]
	mov	esi, DWORD PTR XLP9XX_I2C_MTXFIFO[rip]
	mov	rdi, rbp
	add	rbx, 4
	call	xlp9xx_write_i2c_reg@PLT
	cmp	r12, rbx
	jne	.L3
.L2:
	sub	DWORD PTR 8[rbp], r13d
	sal	r13, 2
	add	QWORD PTR 0[rbp], r13
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	xlp9xx_i2c_fill_tx_fifo, .-xlp9xx_i2c_fill_tx_fifo
	.comm	XLP9XX_I2C_MTXFIFO,4,4
	.comm	XLP9XX_I2C_FIFO_SIZE,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-xlp9xx.c_xlp9xx_i2c_fill_tx_fifo.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xlp9xx_i2c_fill_tx_fifo, %function
xlp9xx_i2c_fill_tx_fifo:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	ldr	r3, .L10
	ldr	r0, [r0, #4]
	ldr	r1, [r3]
	ldr	r4, [r5]
	bl	min
	subs	r8, r0, #0
	moveq	r9, r8
	beq	.L2
	sub	r4, r4, #4
	ldr	r7, .L10+4
	add	r6, r4, r8, lsl #2
	lsl	r9, r8, #2
.L3:
	ldr	r2, [r4, #4]!
	mov	r0, r5
	ldr	r1, [r7]
	bl	xlp9xx_write_i2c_reg
	cmp	r6, r4
	bne	.L3
.L2:
	ldr	r0, [r5, #4]
	ldr	r3, [r5]
	sub	r8, r0, r8
	add	r3, r3, r9
	stm	r5, {r3, r8}
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	.align	2
.L10:
	.word	XLP9XX_I2C_FIFO_SIZE
	.word	XLP9XX_I2C_MTXFIFO
	.size	xlp9xx_i2c_fill_tx_fifo, .-xlp9xx_i2c_fill_tx_fifo
	.comm	XLP9XX_I2C_MTXFIFO,4,4
	.comm	XLP9XX_I2C_FIFO_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
