	.file	"extr_ti-dac082s085.c_ti_dac_read_raw.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ti_dac_read_raw, @function
ti_dac_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, rsi
	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, rdx
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, r8
	call	iio_priv@PLT
	mov	r14, rax
	cmp	rbx, 128
	je	.L2
	cmp	rbx, 129
	jne	.L3
	mov	rdx, QWORD PTR 0[r13]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	DWORD PTR 0[rbp], eax
	mov	eax, DWORD PTR IIO_VAL_INT[rip]
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L2:
	.cfi_restore_state
	mov	edi, DWORD PTR 12[rax]
	call	regulator_get_voltage@PLT
	test	eax, eax
	js	.L1
	movsx	rdx, eax
	sar	eax, 31
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	imul	rdx, rdx, 274877907
	sar	rdx, 38
	sub	edx, eax
	mov	DWORD PTR 0[rbp], edx
	mov	eax, DWORD PTR 8[r14]
	pop	rbp
	.cfi_def_cfa_offset 32
	mov	DWORD PTR [r12], eax
	pop	r12
	.cfi_def_cfa_offset 24
	mov	eax, DWORD PTR IIO_VAL_FRACTIONAL_LOG2[rip]
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	eax, DWORD PTR EINVAL[rip]
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ti_dac_read_raw, .-ti_dac_read_raw
	.comm	IIO_VAL_INT,4,4
	.comm	IIO_VAL_FRACTIONAL_LOG2,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_ti-dac082s085.c_ti_dac_read_raw.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ti_dac_read_raw, %function
ti_dac_read_raw:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r5, [sp, #24]
	mov	r4, r1
	mov	r6, r2
	mov	r7, r3
	bl	iio_priv
	cmp	r5, #128
	mov	r8, r0
	beq	.L2
	cmp	r5, #129
	bne	.L3
	ldr	r2, [r0]
	ldr	r1, [r4]
	ldr	r3, .L7
	ldr	r2, [r2, r1, lsl #2]
	str	r2, [r6]
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r0, [r0, #8]
	bl	regulator_get_voltage
	cmp	r0, #0
	poplt	{r4, r5, r6, r7, r8, pc}
	ldr	r1, .L7+4
	asr	r3, r0, #31
	smull	r2, r1, r0, r1
	rsb	r0, r3, r1, asr #6
	str	r0, [r6]
	ldr	r2, [r8, #4]
	ldr	r3, .L7+8
	str	r2, [r7]
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L3:
	ldr	r3, .L7+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	.align	2
.L7:
	.word	IIO_VAL_INT
	.word	274877907
	.word	IIO_VAL_FRACTIONAL_LOG2
	.word	EINVAL
	.size	ti_dac_read_raw, .-ti_dac_read_raw
	.comm	IIO_VAL_INT,4,4
	.comm	IIO_VAL_FRACTIONAL_LOG2,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
