	.file	"extr_ad2s90.c_ad2s90_read_raw.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ad2s90_read_raw, @function
ad2s90_read_raw:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, r8
	call	iio_priv@PLT
	mov	r14, rax
	mov	rax, QWORD PTR IIO_ANGL[rip]
	cmp	QWORD PTR 0[rbp], rax
	jne	.L8
	cmp	rbx, 128
	je	.L4
	cmp	rbx, 129
	je	.L5
.L8:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	lea	rbp, 8[r14]
	mov	rdi, rbp
	call	mutex_lock@PLT
	mov	edi, DWORD PTR 12[r14]
	mov	rsi, QWORD PTR [r14]
	mov	edx, 2
	call	spi_read@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L11
	mov	rdx, QWORD PTR [r14]
	mov	rdi, rbp
	mov	eax, DWORD PTR 4[rdx]
	mov	edx, DWORD PTR [rdx]
	sar	eax, 4
	sal	edx, 4
	and	eax, 15
	or	eax, edx
	mov	DWORD PTR 0[r13], eax
	call	mutex_unlock@PLT
	mov	r12d, DWORD PTR IIO_VAL_INT[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	DWORD PTR 0[r13], 6283
	mov	DWORD PTR [r12], 12
	mov	r12d, DWORD PTR IIO_VAL_FRACTIONAL_LOG2[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rdi, rbp
	call	mutex_unlock@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ad2s90_read_raw, .-ad2s90_read_raw
	.comm	IIO_VAL_INT,4,4
	.comm	IIO_VAL_FRACTIONAL_LOG2,4,4
	.comm	IIO_ANGL,8,8
	.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_ad2s90.c_ad2s90_read_raw.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ad2s90_read_raw, %function
ad2s90_read_raw:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r1
	mov	r6, r2
	mov	r7, r3
	ldr	r8, [sp, #24]
	bl	iio_priv
	ldr	r3, .L12
	ldr	r2, [r4]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L8
	cmp	r8, #128
	beq	.L4
	cmp	r8, #129
	beq	.L5
.L8:
	ldr	r3, .L12+4
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	mov	r5, r0
	add	r7, r0, #4
	mov	r0, r7
	bl	mutex_lock
	mov	r2, #2
	ldr	r1, [r5]
	ldr	r0, [r5, #8]
	bl	spi_read
	subs	r4, r0, #0
	blt	.L11
	ldr	r2, [r5]
	mov	r0, r7
	ldm	r2, {r2, r3}
	asr	r3, r3, #4
	and	r3, r3, #15
	orr	r3, r3, r2, lsl #4
	str	r3, [r6]
	bl	mutex_unlock
	ldr	r3, .L12+8
	ldr	r4, [r3]
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	mov	r2, #12
	ldr	r1, .L12+12
	ldr	r3, .L12+16
	str	r1, [r6]
	str	r2, [r7]
	ldr	r4, [r3]
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	mov	r0, r7
	bl	mutex_unlock
	b	.L1
.L13:
	.align	2
.L12:
	.word	IIO_ANGL
	.word	EINVAL
	.word	IIO_VAL_INT
	.word	6283
	.word	IIO_VAL_FRACTIONAL_LOG2
	.size	ad2s90_read_raw, .-ad2s90_read_raw
	.comm	IIO_VAL_INT,4,4
	.comm	IIO_VAL_FRACTIONAL_LOG2,4,4
	.comm	IIO_ANGL,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
