	.file	"extr_tcs3472.c_tcs3472_write_event.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	tcs3472_write_event, @function
tcs3472_write_event:
.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
	mov	r14d, ecx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, r8d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, r9d
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	iio_priv@PLT
	lea	r13, 12[rax]
	mov	rbx, rax
	mov	rdi, r13
	call	mutex_lock@PLT
	cmp	r12d, 128
	je	.L2
	cmp	r12d, 129
	jne	.L4
	mov	rdi, QWORD PTR tcs3472_intr_pers[rip]
	imul	ebp, DWORD PTR USEC_PER_SEC[rip]
	mov	r14d, 1
	mov	r15d, 4
	add	ebp, DWORD PTR 64[rsp]
	mov	r12d, 256
	call	ARRAY_SIZE@PLT
	sub	eax, 1
	cmp	eax, r14d
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdi, QWORD PTR tcs3472_intr_pers[rip]
	mov	eax, r12d
	sub	eax, DWORD PTR 20[rbx]
	imul	eax, DWORD PTR [rdi+r15]
	add	r15, 4
	imul	eax, eax, 2400
	cmp	eax, ebp
	jge	.L11
	call	ARRAY_SIZE@PLT
	add	r14d, 1
	sub	eax, 1
	cmp	eax, r14d
	jg	.L12
.L11:
	mov	edi, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR TCS3472_PERS[rip]
	mov	edx, r14d
	call	i2c_smbus_write_byte_data@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L7
	mov	DWORD PTR 8[rbx], r14d
.L7:
	mov	rdi, r13
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	cmp	r14d, 130
	je	.L5
	cmp	r14d, 131
	je	.L6
.L4:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	mov	edi, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR TCS3472_AILT[rip]
	mov	edx, ebp
	call	i2c_smbus_write_word_data@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L7
	mov	DWORD PTR 4[rbx], ebp
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR TCS3472_AIHT[rip]
	mov	edx, ebp
	call	i2c_smbus_write_word_data@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L7
	mov	DWORD PTR [rbx], ebp
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	tcs3472_write_event, .-tcs3472_write_event
	.comm	tcs3472_intr_pers,8,8
	.comm	USEC_PER_SEC,4,4
	.comm	TCS3472_PERS,4,4
	.comm	TCS3472_AILT,4,4
	.comm	TCS3472_AIHT,4,4
	.comm	EINVAL,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_tcs3472.c_tcs3472_write_event.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tcs3472_write_event, %function
tcs3472_write_event:
	@ args = 12, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, [sp, #24]
	mov	r5, r3
	bl	iio_priv
	add	r7, r0, #12
	mov	r4, r0
	mov	r0, r7
	bl	mutex_lock
	cmp	r6, #128
	beq	.L2
	cmp	r6, #129
	bne	.L4
	ldr	r3, .L17
	ldr	r2, [sp, #32]
	ldr	r5, [r3]
	ldr	r3, [sp, #28]
	ldr	r6, .L17+4
	mla	r3, r5, r3, r2
	ldr	r0, [r6]
	mov	r5, r3
	bl	ARRAY_SIZE
	mov	r8, #1
	sub	r0, r0, #1
	cmp	r0, r8
	ble	.L11
.L12:
	ldr	r0, [r6]
	ldr	r3, [r4, #20]
	ldr	r2, [r0, r8, lsl #2]
	rsb	r3, r3, #256
	mul	r3, r2, r3
	add	r3, r3, r3, lsl #2
	rsb	r3, r3, r3, lsl #4
	cmp	r5, r3, lsl #5
	ble	.L11
	bl	ARRAY_SIZE
	add	r8, r8, #1
	sub	r0, r0, #1
	cmp	r0, r8
	bgt	.L12
.L11:
	ldr	r3, .L17+8
	mov	r2, r8
	ldr	r1, [r3]
	ldr	r0, [r4, #16]
	bl	i2c_smbus_write_byte_data
	subs	r5, r0, #0
	streq	r8, [r4, #8]
.L7:
	mov	r0, r7
	bl	mutex_unlock
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	cmp	r5, #130
	beq	.L5
	cmp	r5, #131
	beq	.L6
.L4:
	ldr	r3, .L17+12
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L7
.L6:
	ldr	r3, .L17+16
	ldr	r2, [sp, #28]
	ldr	r1, [r3]
	ldr	r0, [r4, #16]
	bl	i2c_smbus_write_word_data
	subs	r5, r0, #0
	ldreq	r3, [sp, #28]
	streq	r3, [r4, #4]
	b	.L7
.L5:
	ldr	r3, .L17+20
	ldr	r2, [sp, #28]
	ldr	r1, [r3]
	ldr	r0, [r4, #16]
	bl	i2c_smbus_write_word_data
	subs	r5, r0, #0
	ldreq	r3, [sp, #28]
	streq	r3, [r4]
	b	.L7
.L18:
	.align	2
.L17:
	.word	USEC_PER_SEC
	.word	tcs3472_intr_pers
	.word	TCS3472_PERS
	.word	EINVAL
	.word	TCS3472_AILT
	.word	TCS3472_AIHT
	.size	tcs3472_write_event, .-tcs3472_write_event
	.comm	tcs3472_intr_pers,4,4
	.comm	USEC_PER_SEC,4,4
	.comm	TCS3472_PERS,4,4
	.comm	TCS3472_AILT,4,4
	.comm	TCS3472_AIHT,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
