	.file	"extr_usbvision-i2c.c_usbvision_i2c_write.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	usbvision_i2c_write, @function
usbvision_i2c_write:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	test	cx, cx
	jle	.L5
	mov	r13, rdi
	mov	r15, rdx
	mov	ebp, ecx
	movzx	r12d, sil
	xor	r14d, r14d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	movsx	rax, ebx
	sub	ebp, ebx
	add	r14d, ebx
	add	r15, rax
	test	bp, bp
	jle	.L1
.L4:
	cmp	bp, 4
	movsx	ebx, bp
	mov	eax, 4
	mov	rdx, r15
	cmovg	ebx, eax
	mov	esi, r12d
	mov	rdi, r13
	mov	ecx, ebx
	call	usbvision_i2c_write_max4@PLT
	test	eax, eax
	jg	.L10
	mov	r14d, eax
	test	eax, eax
	jne	.L1
	mov	r14d, DWORD PTR EFAULT[rip]
	neg	r14d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	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
.L5:
	.cfi_restore_state
	xor	r14d, r14d
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	usbvision_i2c_write, .-usbvision_i2c_write
	.comm	EFAULT,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_usbvision-i2c.c_usbvision_i2c_write.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usbvision_i2c_write, %function
usbvision_i2c_write:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	subs	r4, r3, #0
	ble	.L5
	mov	r8, r0
	mov	r9, r1
	mov	r6, r2
	mov	r7, #0
	b	.L4
.L10:
	cmp	r4, #0
	add	r6, r6, r5
	add	r7, r7, r5
	ble	.L1
.L4:
	cmp	r4, #4
	movlt	r5, r4
	movge	r5, #4
	mov	r2, r6
	mov	r3, r5
	mov	r1, r9
	mov	r0, r8
	bl	usbvision_i2c_write_max4
	sub	r4, r4, r5
	lsl	r4, r4, #16
	cmp	r0, #0
	asr	r4, r4, #16
	bgt	.L10
	movne	r7, r0
	ldreq	r3, .L11
	ldreq	r7, [r3]
	rsbeq	r7, r7, #0
.L1:
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L5:
	mov	r7, #0
	b	.L1
.L12:
	.align	2
.L11:
	.word	EFAULT
	.size	usbvision_i2c_write, .-usbvision_i2c_write
	.comm	EFAULT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
