	.file	"extr_ad8366.c_ad8366_write.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"write failed (%d)"
	.text
	.p2align 4
	.type	ad8366_write, @function
ad8366_write:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	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
	call	iio_priv@PLT
	mov	rbx, rax
	mov	eax, DWORD PTR [rax]
	cmp	eax, 129
	je	.L2
	cmp	eax, 130
	je	.L3
	cmp	eax, 128
	je	.L9
.L5:
	mov	edx, DWORD PTR 4[rbp]
	mov	rsi, QWORD PTR 8[rbx]
	mov	edi, DWORD PTR 16[rbx]
	call	spi_write@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L10
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rdi, rbp
	mov	edx, eax
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rax, QWORD PTR 8[rbx]
	mov	esi, r12d
	and	esi, 63
	mov	BYTE PTR [rax], sil
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, r12d
	and	edi, 63
	call	bitrev8@PLT
	mov	edi, r13d
	and	edi, 63
	mov	r12d, eax
	call	bitrev8@PLT
	mov	rdx, QWORD PTR 8[rbx]
	shr	r12b, 2
	mov	ecx, eax
	sal	eax, 4
	shr	cl, 4
	or	eax, r12d
	mov	BYTE PTR [rdx], cl
	mov	rdx, QWORD PTR 8[rbx]
	mov	BYTE PTR 1[rdx], al
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rax, QWORD PTR 8[rbx]
	mov	esi, r12d
	and	esi, 31
	mov	BYTE PTR [rax], sil
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	ad8366_write, .-ad8366_write
	.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_ad8366.c_ad8366_write.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"write failed (%d)\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ad8366_write, %function
ad8366_write:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r1
	mov	r5, r2
	mov	r6, r0
	bl	iio_priv
	ldr	r3, [r0]
	mov	r4, r0
	cmp	r3, #129
	beq	.L2
	cmp	r3, #130
	beq	.L3
	cmp	r3, #128
	beq	.L9
.L5:
	ldr	r1, [r4, #4]
	ldr	r0, [r4, #8]
	ldr	r2, [r6, #4]
	bl	spi_write
	subs	r4, r0, #0
	blt	.L10
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	mov	r0, r6
	mov	r2, r4
	ldr	r1, .L11
	bl	dev_err
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	ldr	r3, [r0, #4]
	and	r1, r7, #63
	strb	r1, [r3]
	b	.L5
.L3:
	and	r0, r7, #63
	bl	bitrev8
	mov	r3, r0
	and	r0, r5, #63
	mov	r5, r3
	bl	bitrev8
	ldr	r3, [r4, #4]
	lsr	r2, r0, #4
	strb	r2, [r3]
	ldr	r3, [r4, #4]
	lsr	r5, r5, #2
	orr	r5, r5, r0, lsl #4
	strb	r5, [r3, #1]
	b	.L5
.L2:
	ldr	r3, [r0, #4]
	and	r1, r7, #31
	strb	r1, [r3]
	b	.L5
.L12:
	.align	2
.L11:
	.word	.LC0
	.size	ad8366_write, .-ad8366_write
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
