	.file	"extr_cpcap-adc.c_cpcap_adc_convert.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	cpcap_adc_convert, @function
cpcap_adc_convert:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	ecx, DWORD PTR [rdi]
	mov	rbx, rdi
	mov	rdx, QWORD PTR 8[rdi]
	mov	eax, DWORD PTR CPCAP_ADC_BATTP[rip]
	cmp	ecx, 128
	je	.L4
	cmp	ecx, 129
	mov	eax, ecx
	cmove	eax, DWORD PTR CPCAP_ADC_BATTI[rip]
.L4:
	cdqe
	lea	rax, [rax+rax*2]
	lea	rsi, [rdx+rax*8]
	mov	rax, QWORD PTR IIO_CHAN_INFO_RAW[rip]
	cmp	QWORD PTR [rsi], rax
	je	.L1
	cmp	DWORD PTR CPCAP_ADC_AD0[rip], ecx
	mov	edi, DWORD PTR 4[rbx]
	je	.L7
	cmp	DWORD PTR CPCAP_ADC_AD3[rip], ecx
	je	.L7
	mov	eax, DWORD PTR 20[rsi]
	mov	ecx, DWORD PTR 16[rsi]
	imul	eax, edi
	mov	DWORD PTR 4[rbx], eax
	test	ecx, ecx
	je	.L1
	cdq
	idiv	ecx
	add	eax, DWORD PTR 8[rsi]
	mov	DWORD PTR 4[rbx], eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	call	cpcap_adc_table_to_millicelcius@PLT
	mov	DWORD PTR 4[rbx], eax
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	cpcap_adc_convert, .-cpcap_adc_convert
	.comm	IIO_CHAN_INFO_RAW,8,8
	.comm	CPCAP_ADC_BATTP,4,4
	.comm	CPCAP_ADC_BATTI,4,4
	.comm	CPCAP_ADC_AD3,4,4
	.comm	CPCAP_ADC_AD0,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_cpcap-adc.c_cpcap_adc_convert.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cpcap_adc_convert, %function
cpcap_adc_convert:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0]
	push	{r4, r5, r6, lr}
	cmp	r3, #128
	mov	r4, r0
	ldr	r1, [r0, #8]
	beq	.L2
	cmp	r3, #129
	movne	r2, r3
	ldreq	r2, .L15
	ldreq	r2, [r2]
.L4:
	ldr	r0, .L15+4
	ldr	ip, [r1, r2, lsl #4]
	ldr	r0, [r0]
	add	r5, r1, r2, lsl #4
	cmp	ip, r0
	popeq	{r4, r5, r6, pc}
	ldr	r2, .L15+8
	ldr	r0, [r4, #4]
	ldr	r2, [r2]
	cmp	r2, r3
	beq	.L7
	ldr	r2, .L15+12
	ldr	r2, [r2]
	cmp	r2, r3
	beq	.L7
	ldr	r3, [r5, #12]
	ldr	r1, [r5, #8]
	mul	r0, r3, r0
	cmp	r1, #0
	str	r0, [r4, #4]
	popeq	{r4, r5, r6, pc}
	bl	__aeabi_idiv
	ldr	r3, [r5, #4]
	add	r0, r0, r3
	str	r0, [r4, #4]
	pop	{r4, r5, r6, pc}
.L2:
	ldr	r2, .L15+16
	ldr	r2, [r2]
	b	.L4
.L7:
	bl	cpcap_adc_table_to_millicelcius
	str	r0, [r4, #4]
	pop	{r4, r5, r6, pc}
.L16:
	.align	2
.L15:
	.word	CPCAP_ADC_BATTI
	.word	IIO_CHAN_INFO_RAW
	.word	CPCAP_ADC_AD0
	.word	CPCAP_ADC_AD3
	.word	CPCAP_ADC_BATTP
	.size	cpcap_adc_convert, .-cpcap_adc_convert
	.comm	IIO_CHAN_INFO_RAW,4,4
	.comm	CPCAP_ADC_BATTP,4,4
	.comm	CPCAP_ADC_BATTI,4,4
	.comm	CPCAP_ADC_AD3,4,4
	.comm	CPCAP_ADC_AD0,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
