	.file	"extr_bttv-i2c.c_bttv_I2CWrite.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	bttv_I2CWrite
	.type	bttv_I2CWrite, @function
bttv_I2CWrite:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	xor	ebx, ebx
	sub	rsp, 16
	.cfi_def_cfa_offset 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	test	r8d, r8d
	setne	bl
	add	ebx, 1
	cmp	QWORD PTR [rdi], 0
	jne	.L6
	shr	sil
	mov	BYTE PTR 6[rsp], dl
	add	rdi, 8
	mov	edx, ebx
	mov	BYTE PTR [rdi], sil
	lea	rsi, 6[rsp]
	mov	BYTE PTR 7[rsp], cl
	call	i2c_master_send@PLT
	cmp	eax, ebx
	setne	al
	movzx	eax, al
	neg	eax
.L1:
	mov	rbx, QWORD PTR 8[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L9
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	eax, -1
	jmp	.L1
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	bttv_I2CWrite, .-bttv_I2CWrite
	.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_bttv-i2c.c_bttv_I2CWrite.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	bttv_I2CWrite
	.syntax unified
	.arm
	.fpu softvfp
	.type	bttv_I2CWrite, %function
bttv_I2CWrite:
	@ args = 4, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	sub	sp, sp, #8
	ldr	lr, [sp, #16]
	ldr	ip, [r0]
	cmp	lr, #0
	movne	r4, #2
	moveq	r4, #1
	cmp	ip, #0
	mov	ip, r2
	ldr	r2, .L10
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	bne	.L6
	lsr	r1, r1, #1
	strb	r1, [r0, #4]!
	mov	r2, r4
	mov	r1, sp
	strb	ip, [sp]
	strb	r3, [sp, #1]
	bl	i2c_master_send
	subs	r0, r0, r4
	mvnne	r0, #0
.L1:
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L9
	add	sp, sp, #8
	@ sp needed
	pop	{r4, pc}
.L6:
	mvn	r0, #0
	b	.L1
.L9:
	bl	__stack_chk_fail
.L11:
	.align	2
.L10:
	.word	.LC0
	.size	bttv_I2CWrite, .-bttv_I2CWrite
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
