	.file	"extr_hp206c.c_hp206c_read_raw.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	hp206c_read_raw, @function
hp206c_read_raw:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, r8
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	QWORD PTR 8[rsp], rcx
	call	iio_priv@PLT
	lea	r14, 16[rax]
	mov	rbp, rax
	mov	rdi, r14
	call	mutex_lock@PLT
	cmp	rbx, 131
	je	.L2
	cmp	rbx, 132
	je	.L3
	cmp	rbx, 130
	je	.L15
.L5:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L8:
	mov	rdi, r14
	call	mutex_unlock@PLT
	add	rsp, 24
	.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
	mov	eax, DWORD PTR [r12]
	cmp	eax, 128
	je	.L9
	cmp	eax, 129
	jne	.L5
	mov	rax, QWORD PTR 8[rbp]
	mov	esi, DWORD PTR HP206C_CMD_ADC_CVT[rip]
	mov	rdi, r15
	or	esi, DWORD PTR HP206C_CMD_ADC_CVT_CHNL_PT[rip]
	lea	rdx, [rax+rax*2]
	mov	rax, QWORD PTR hp206c_osr_settings[rip]
	lea	rax, [rax+rdx*4]
	mov	edx, DWORD PTR HP206C_CMD_READ_P[rip]
	mov	ecx, DWORD PTR 4[rax]
	or	esi, DWORD PTR [rax]
	call	hp206c_conv_and_read@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L8
	mov	DWORD PTR 0[r13], eax
	mov	r12d, DWORD PTR IIO_VAL_INT[rip]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L15:
	mov	eax, DWORD PTR [r12]
	cmp	eax, 128
	je	.L11
	cmp	eax, 129
	jne	.L5
	mov	rax, QWORD PTR 8[rsp]
	mov	DWORD PTR 0[r13], 0
	mov	DWORD PTR [rax], 1000
	mov	r12d, DWORD PTR IIO_VAL_INT_PLUS_MICRO[rip]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L3:
	mov	eax, DWORD PTR [r12]
	cmp	eax, 128
	je	.L6
	cmp	eax, 129
	jne	.L5
	mov	rdx, QWORD PTR 8[rbp]
	mov	rax, QWORD PTR hp206c_osr_rates[rip]
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	DWORD PTR 0[r13], eax
	mov	r12d, DWORD PTR IIO_VAL_INT[rip]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rax, QWORD PTR 0[rbp]
	mov	esi, DWORD PTR HP206C_CMD_ADC_CVT[rip]
	mov	rdi, r15
	or	esi, DWORD PTR HP206C_CMD_ADC_CVT_CHNL_T[rip]
	lea	rdx, [rax+rax*2]
	mov	rax, QWORD PTR hp206c_osr_settings[rip]
	lea	rax, [rax+rdx*4]
	mov	edx, DWORD PTR HP206C_CMD_READ_T[rip]
	mov	ecx, DWORD PTR 8[rax]
	or	esi, DWORD PTR [rax]
	call	hp206c_conv_and_read@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L8
	mov	esi, 19
	mov	edi, eax
	call	sign_extend32@PLT
	mov	DWORD PTR 0[r13], eax
	mov	r12d, DWORD PTR IIO_VAL_INT[rip]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdx, QWORD PTR 0[rbp]
	mov	rax, QWORD PTR hp206c_osr_rates[rip]
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	DWORD PTR 0[r13], eax
	mov	r12d, DWORD PTR IIO_VAL_INT[rip]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rax, QWORD PTR 8[rsp]
	mov	DWORD PTR 0[r13], 0
	mov	DWORD PTR [rax], 10000
	mov	r12d, DWORD PTR IIO_VAL_INT_PLUS_MICRO[rip]
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	hp206c_read_raw, .-hp206c_read_raw
	.comm	hp206c_osr_settings,8,8
	.comm	hp206c_osr_rates,8,8
	.comm	IIO_VAL_INT_PLUS_MICRO,4,4
	.comm	IIO_VAL_INT,4,4
	.comm	HP206C_CMD_READ_T,4,4
	.comm	HP206C_CMD_READ_P,4,4
	.comm	HP206C_CMD_ADC_CVT_CHNL_T,4,4
	.comm	HP206C_CMD_ADC_CVT_CHNL_PT,4,4
	.comm	HP206C_CMD_ADC_CVT,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_hp206c.c_hp206c_read_raw.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hp206c_read_raw, %function
hp206c_read_raw:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r5, [sp, #32]
	mov	r8, r1
	mov	r6, r2
	mov	r9, r3
	mov	r10, r0
	bl	iio_priv
	add	r7, r0, #8
	mov	r4, r0
	mov	r0, r7
	bl	mutex_lock
	cmp	r5, #131
	beq	.L2
	cmp	r5, #132
	beq	.L3
	cmp	r5, #130
	beq	.L16
.L5:
	ldr	r3, .L17
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L8:
	mov	r0, r7
	bl	mutex_unlock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	ldr	r3, [r8]
	cmp	r3, #128
	beq	.L9
	cmp	r3, #129
	bne	.L5
	ldr	r2, .L17+4
	ldr	r3, [r4, #4]
	ldr	r1, .L17+8
	ldr	r0, .L17+12
	ldr	r2, [r2]
	ldr	r0, [r0]
	ldr	lr, [r1]
	add	r3, r3, r3, lsl #1
	ldr	r1, [r2, r3, lsl #2]
	ldr	ip, .L17+16
	orr	lr, r0, lr
	add	r3, r2, r3, lsl #2
	mov	r0, r10
	ldr	r3, [r3, #4]
	ldr	r2, [ip]
	orr	r1, lr, r1
	bl	hp206c_conv_and_read
	subs	r4, r0, #0
	ldrge	r3, .L17+20
	strge	r4, [r6]
	ldrge	r4, [r3]
	b	.L8
.L16:
	ldr	r3, [r8]
	cmp	r3, #128
	beq	.L11
	cmp	r3, #129
	bne	.L5
	mov	r1, #0
	mov	r2, #1000
	ldr	r3, .L17+24
	str	r1, [r6]
	str	r2, [r9]
	ldr	r4, [r3]
	b	.L8
.L3:
	ldr	r3, [r8]
	cmp	r3, #128
	beq	.L6
	cmp	r3, #129
	bne	.L5
	ldr	r3, .L17+28
	ldr	r1, [r4, #4]
.L14:
	ldr	r2, [r3]
	ldr	r3, .L17+20
	ldr	r2, [r2, r1, lsl #2]
	str	r2, [r6]
	ldr	r4, [r3]
	b	.L8
.L9:
	ldr	r2, .L17+4
	ldr	r3, [r4]
	ldr	r1, .L17+32
	ldr	r0, .L17+12
	ldr	r2, [r2]
	ldr	r0, [r0]
	ldr	lr, [r1]
	add	r3, r3, r3, lsl #1
	ldr	r1, [r2, r3, lsl #2]
	ldr	ip, .L17+36
	orr	lr, r0, lr
	add	r3, r2, r3, lsl #2
	mov	r0, r10
	ldr	r3, [r3, #8]
	ldr	r2, [ip]
	orr	r1, lr, r1
	bl	hp206c_conv_and_read
	subs	r4, r0, #0
	blt	.L8
	mov	r1, #19
	bl	sign_extend32
	ldr	r3, .L17+20
	str	r0, [r6]
	ldr	r4, [r3]
	b	.L8
.L6:
	ldr	r3, .L17+28
	ldr	r1, [r4]
	b	.L14
.L11:
	mov	r1, #0
	ldr	r2, .L17+40
	ldr	r3, .L17+24
	str	r1, [r6]
	str	r2, [r9]
	ldr	r4, [r3]
	b	.L8
.L18:
	.align	2
.L17:
	.word	EINVAL
	.word	hp206c_osr_settings
	.word	HP206C_CMD_ADC_CVT_CHNL_PT
	.word	HP206C_CMD_ADC_CVT
	.word	HP206C_CMD_READ_P
	.word	IIO_VAL_INT
	.word	IIO_VAL_INT_PLUS_MICRO
	.word	hp206c_osr_rates
	.word	HP206C_CMD_ADC_CVT_CHNL_T
	.word	HP206C_CMD_READ_T
	.word	10000
	.size	hp206c_read_raw, .-hp206c_read_raw
	.comm	hp206c_osr_settings,4,4
	.comm	hp206c_osr_rates,4,4
	.comm	IIO_VAL_INT_PLUS_MICRO,4,4
	.comm	IIO_VAL_INT,4,4
	.comm	HP206C_CMD_READ_T,4,4
	.comm	HP206C_CMD_READ_P,4,4
	.comm	HP206C_CMD_ADC_CVT_CHNL_T,4,4
	.comm	HP206C_CMD_ADC_CVT_CHNL_PT,4,4
	.comm	HP206C_CMD_ADC_CVT,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
