	.file	"extr_ad799x.c_ad799x_write_event_value.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ad799x_write_event_value, @function
ad799x_write_event_value:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, r8d
	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	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, r9d
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	iio_priv@PLT
	test	ebx, ebx
	js	.L4
	mov	r13, rax
	mov	rax, QWORD PTR 8[r12]
	xor	esi, esi
	lea	rdi, -1[rax]
	call	GENMASK@PLT
	cmp	eax, ebx
	jge	.L7
.L4:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	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
.L7:
	.cfi_restore_state
	mov	rdi, rbp
	call	mutex_lock@PLT
	mov	ecx, DWORD PTR [r12]
	mov	edx, r15d
	mov	esi, r14d
	mov	rdi, r12
	sal	ebx, cl
	call	ad799x_threshold_reg@PLT
	mov	edi, DWORD PTR 0[r13]
	mov	edx, ebx
	mov	esi, eax
	call	i2c_smbus_write_word_swapped@PLT
	mov	rdi, rbp
	mov	r12d, eax
	call	mutex_unlock@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ad799x_write_event_value, .-ad799x_write_event_value
	.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_ad799x.c_ad799x_write_event_value.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ad799x_write_event_value, %function
ad799x_write_event_value:
	@ args = 12, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, [sp, #28]
	mov	r4, r1
	mov	r8, r3
	mov	r7, r0
	bl	iio_priv
	cmp	r6, #0
	blt	.L4
	mov	r5, r0
	ldr	r0, [r4, #4]
	mov	r1, #0
	sub	r0, r0, #1
	bl	GENMASK
	cmp	r0, r6
	bge	.L7
.L4:
	ldr	r3, .L8
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	mov	r0, r7
	bl	mutex_lock
	mov	r1, r8
	ldr	r2, [sp, #24]
	mov	r0, r4
	ldr	r5, [r5]
	bl	ad799x_threshold_reg
	ldr	r2, [r4]
	mov	r1, r0
	lsl	r2, r6, r2
	mov	r0, r5
	bl	i2c_smbus_write_word_swapped
	mov	r4, r0
	mov	r0, r7
	bl	mutex_unlock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	.align	2
.L8:
	.word	EINVAL
	.size	ad799x_write_event_value, .-ad799x_write_event_value
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
